Could you benefit from conditional import in windows? (1 Viewer)

pilehave

Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    Hi

    I think I may have found an easy way to make conditional imports possible.

    Say, for instance you have a xml-file you would like to import in all dialogs, but only when they are called while your are in the window mytvhome.xml (window-id 1).

    With my possible solution you could do this:

    Code:
    <import condition="window.isvisible(1)">yourwindow.xml</import>

    Or are imports cached together with the actual window?

    If not, I see a lot of potential in this approach. My method would allow any existing condition to be used just like on nomal controls...

    Let me hear what you think.
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #2
    Ok, tested a bit last night and while it actually works, the dialogs and windows remembers imported files so the condition won't work while browsing the windows. I should have figured this out, but was probably too busy :)

    Now, the optional path is to make the actual controls "active" based on the same conditions. This way you could control it with something like:

    Code:
    <control condition="window.isvisible(1)">

    Hmm...will do a test tonight.
     

    joz

    Portal Pro
    March 17, 2008
    1,353
    306
    Home Country
    Netherlands Netherlands
    This sounds pretty interesting and found it while doing a search on conditional import.
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #4
    It was unfortunately much more complicated than I first thought, so I have parked this idea for the time being.
     

    Users who are viewing this thread

    Top Bottom