Popup3 is really needed Thread last updated on 2004-06-16 06:24:13

Posted by member 7223 on 2004-06-12 13:52:51

Since xLabel allow things like:
!setevar moduleparameter newvalue
!netreloadmodule modulename


Re-configuration of many modules can be made without !reload or !refresh (which have as "known issues" the fact that all dynamically created $evars$ are destroyed)

Then, I think !reload should be avoid !

But it's so usefull to change Popup menu's content that we currently can't do without !reload :(

Then, I just would like to know if someone wants to re-code Popup in order to load all menu in external file(s) instead of step.rc

So, I'll really appreciate something like:
!Popupreloadconfig "filename"

Posted by member 99 on 2004-06-12 21:03:55 link

You can change a popup menu without !reload, but your entries get larger and alphabetized: !PopupDynamicFolder + filemaster

Posted by member 7223 on 2004-06-12 23:33:50 link

I thought about something like this lately. Thanks

Posted by member 7223 on 2004-06-13 00:00:58 link

Ok, I've found something more like I'd like it to be:

Everyone should know that with:
if cond = 1
*popup "cond1" !cond1
elseif cond = 2
*popup "cond2" !cond2
else
*popup "nocond" !nocond
endif

modifying $cond$ with !setevar , then !netreloading Popup2 without doing a !reload doesn't work as expected...

But with:
*popup "cond$cond$" !cond$cond$

That's not perfect but it works :)

It was so simple that I've never see it...

But I still think Popup is outdated

Posted by member 12025 on 2004-06-13 15:41:15 link

Really, you should just avoid setting evars!
evars included, and the same file w/ mzscript. Done.

However, Popup would be great with the likes of...
*Popup "Well, you just go and {{"$AmIAlive$" = "no" "Die" else {"$inthewhpm$" = "yeah" "Get born" else "play outside, kid."}}" !{{some other tests}}hey

And better yet, allow some indication of true/false of vars (say, like BlackBox does).

...or just have something like !LabelRefresh :)

Posted by member 7 on 2004-06-15 05:26:02 link

The true problem is, as Cerbie more or less points out, that evars aren't meant to be dynamic. It's a hack ontop of a system that wasn't designed to support it. The "right" way to do such things is to use mzscript or textedit and !refresh. Most modules support it these days. If a module doesn't, use !(net)reloadmodule.

Posted by member 7223 on 2004-06-16 06:24:13 link

here is an example of an "on the fly" popup re-build without using !reload
I guess there's no best way to do...