string.equals breaks on some comparisons (1 Viewer)

mbuzina

Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    MediaPortal Version: 1.4.0

    Description
    A visibility condition of
    Code:
    <visible>string.equals(#music.title,#Play.Current.Title)</visible>

    will not only give the wrong result (allways true), but will also break the other visibility string.equals on the same window (all true, negating them results in always false).

    Steps to Reproduce:
    Add the following to the musicsongs.xml:
    Code:
    <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>
    See what happens when selecting Folders/Music Files while music is playing/not playing. Compare to what happens when the last control (label Selected Title is playing) is removed from skin file. The behaviour of the other visibility conditions is changing.
     

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    Yes it was quite confusing. There are some other reports on string comparison in the forum, will link later.
     

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    Added to mantis:
    0004491
    priority_normal.gif
    valid string.equals can break skin visibility for other controls
    Skin Engine - 2013-06-21 10:12
     

    Users who are viewing this thread

    Top Bottom