Variable visibility question
#1
Hi all,

Is it not possible to have a variable inside a <visible> tag? I cant seem to get it to work...

Thanks,
Reply
#2
As the visible condition you mean? Then no.

What are you trying to achieve?
Reply
#3
(2018-10-26, 16:30)Hitcher Wrote: As the visible condition you mean? Then no.

What are you trying to achieve?
 Ah okay. I could make the boolean in one statement, but if i put it in a variable it would become much more readable. I just wanted to make sure it wasn't possible to put a variable inside a visibility statement. Wink

Thanks!
Reply
#4
You can add multiple visible tags, but once one is false it will be false. Useable if you just want to have a control/window hidden in rare scenarios.

Another option is write it readable, which is fine. Example:

Code:

<visible>
        [
        !Container.Content(seasons)
        + !Container.Content(episodes)
        + !Container.Content(movies)
        + !Container.Content(sets)
        + !Container.Content(tvshows)
        + !String.StartsWith(Container.FolderPath,plugin://script.skin.helper.widgets/?action=browsegenres)
        + !Window.IsVisible(MyPVRSearch.xml)
        + !Window.IsVisible(MyPVRTimers.xml)
        + !Window.IsVisible(MyPVRguide.xml)
        + !String.StartsWith(Container.Folderpath,androidapp://)
        + !String.StartsWith(Container.FolderPath,pvr://channels/radio/)
        ]
        | Window.IsVisible(MyPics.xml)
</visible>
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#5
(2018-10-26, 18:49)sualfred Wrote: You can add multiple visible tags, but once one is false it will be false. Useable if you just want to have a control/window hidden in rare scenarios.

Another option is write it readable, which is fine. Example:

Code:

<visible>
        [
        !Container.Content(seasons)
        + !Container.Content(episodes)
        + !Container.Content(movies)
        + !Container.Content(sets)
        + !Container.Content(tvshows)
        + !String.StartsWith(Container.FolderPath,plugin://script.skin.helper.widgets/?action=browsegenres)
        + !Window.IsVisible(MyPVRSearch.xml)
        + !Window.IsVisible(MyPVRTimers.xml)
        + !Window.IsVisible(MyPVRguide.xml)
        + !String.StartsWith(Container.Folderpath,androidapp://)
        + !String.StartsWith(Container.FolderPath,pvr://channels/radio/)
        ]
        | Window.IsVisible(MyPics.xml)
</visible>
I did not think of writing it that way. That's great! Thanks man. Wink
Reply

Logout Mark Read Team Forum Stats Members Help
Variable visibility question0