Uploaded image for project: 'MediaPortal 1'
  1. MediaPortal 1
  2. MP1-2567

valid string.equals can break skin visibility for other controls

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 1.4.0
    • Skin Engine
    • 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 control MP1-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/

      Attachments

        Activity

          People

            Unassigned Unassigned
            mbuzina Marc Buzina (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: