2017-07-30, 07:16
(2017-07-28, 05:09)jurialmunkey Wrote:(2017-07-26, 22:19)Jeroen Wrote: I expected a simple
Code:Integer.IsGreater(Container(1000$SKINSHORTCUTS[id]).NumItems,0)
As a visibility condition on my widget template would do the trick but sadly it doesn't. It actually prevents the vertical grouplist to be accessible at all. Probably because
I'm not addressing the container properly? Just not sure how I would have to though...
It is because the container always starts with 0 items, so your container is never visible and so it never loads any items.
What Estuary does is adds the Container.IsUpdating as a condition
e.g.
PHP Code:<visible>Integer.IsGreater(Container(1000$SKINSHORTCUTS[id]).NumItems,0) | Container(1000$SKINSHORTCUTS[id]).IsUpdating</visible>
Though I'm having problems even with that in Horizon.
I had to add a hidden button control in the focusedlayout of my main menu (I know, naughty naughty not supposed to do that) that sets a property and then uses an alarmclock with time at 00:00 to immediately unset the property and I have that in the condition
e.g.
PHP Code:<visible>Integer.IsGreater(Container(1000$SKINSHORTCUTS[id]).NumItems,0) | Container(1000$SKINSHORTCUTS[id]).IsUpdating | String.IsEmpty(Window(Home).Property(WidgetLoading))</visible>
And then in my focusedlayout of home menu:
PHP Code:<control type="button">
<animation effect="fade" end="0" condition="true">Conditional</animation>
<onfocus>ClearProperty(WidgetLoading,Home)</onfocus>
<onfocus>AlarmClock(SetLoad,SetProperty(WidgetLoading,1,Home),00:00,silent)</onfocus>
</control>
Smart, that worked like a charm. Thanks!