Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
1.4.0
-
None
Description
A quite annoying (to quote the forum) bug that occurs only in very specific situations.
When performing a conditional visibility on a control with a string comparison of string.equals(#music.title,#Play.Current.Title), this will not only give the wron result (always true) but will break all other equality comparisons on other controls in the window.
h4. Steps to Reproduce
Put the following (add positions & sizes) within the mymusicsongs.xml file and go to mymusicsongs:
[code=xml]<control>
<type>label</type>
<label>Selected: #music.title</label>
</control>
<control>
<type>label</type>
<label>Playing: #Play.Current.Title</label>
</control>
<control>
<type>label</type>
<label>Music File selected (title not empty)</label>
<visible>string.equals(#music.title,)</visible>
</control>
<control>
<type>label</type>
<label>Folder selected (title empty)</label>
<visible>!string.equals(#music.title,)</visible>
</control>
<control>
<type>label</type>
<label>Selected Title is playing</label>
<visible>string.equals(#music.title,#Play.Current.Title)</visible>
</control>[/code]
With the last control controls 4 and 5 will be shown, no matter what is selected. Remove controlMP1-5 and 3 or 4 will show up depending on what is selected in façade.
h4. Additional Information
http://forum.team-mediaportal.com/threads/string-equals-breaks-on-some-comparisons.119829/
When performing a conditional visibility on a control with a string comparison of string.equals(#music.title,#Play.Current.Title), this will not only give the wron result (always true) but will break all other equality comparisons on other controls in the window.
h4. Steps to Reproduce
Put the following (add positions & sizes) within the mymusicsongs.xml file and go to mymusicsongs:
[code=xml]<control>
<type>label</type>
<label>Selected: #music.title</label>
</control>
<control>
<type>label</type>
<label>Playing: #Play.Current.Title</label>
</control>
<control>
<type>label</type>
<label>Music File selected (title not empty)</label>
<visible>string.equals(#music.title,)</visible>
</control>
<control>
<type>label</type>
<label>Folder selected (title empty)</label>
<visible>!string.equals(#music.title,)</visible>
</control>
<control>
<type>label</type>
<label>Selected Title is playing</label>
<visible>string.equals(#music.title,#Play.Current.Title)</visible>
</control>[/code]
With the last control controls 4 and 5 will be shown, no matter what is selected. Remove control
h4. Additional Information
http://forum.team-mediaportal.com/threads/string-equals-breaks-on-some-comparisons.119829/
Attachments
Issue Links
- links to