Page 1 of 1

preopenstack and closestack events

Posted: Wed Nov 26, 2008 6:08 am
by kotikoti
Hi all,
Please advice on when the above can be used.

I have a stack build with several substacks within. I am calling one of the substacks as a modal item as follows

Code: Select all

modal stack "systemSettings" --substack
What I end up getting is the code in the main stack executing the preopenstacks function (not desired) since this sub window only meant to display some data... and when I close it, it also executes the closestack function, thus destroying some variables I have in the system

Is my call to modal stack "systemSettings" at fault or am I missing something?

Cheers

Posted: Wed Nov 26, 2008 7:31 am
by BvG
This is a message path issue. Stack messages that are unhandled will be passed on trough the message path. as the mainstack comes after the substack in the message path, it will get an all stack messages originating from the substack.

The easiest workaround is to put the mainstack handlers into the first card of the mainstack. Openstack etc. all will be sent to the first card of a stack, so they'll trigger when the mainstack opens. The cards of the mainstack are not in the message path for substacks so they're "save" there.

Posted: Wed Nov 26, 2008 7:36 am
by kotikoti
Hi BvG
Thanks for the quick pointer... Late in the night, and forgot the message path rules,
Koti2