On 9/20/12 6:40 PM, Bob Sneidar wrote:
What is the nature of the group you are showing or hiding? Is it a datagrid? It's my opinion that preOpenStack should be used only for things that need to happen before the stack opens. If it can be put into an openStack handler, put it there.
Maybe datagrids are a different beast, but I've never had trouble with preopencard. Its purpose is to allow us to set up everything before the card is drawn to screen, so that's what I use it for.
If you are trying to show a group on a card in a preOpenCard or preOpenStack handler, technically the group doesn't exist in memory yet. (Someone will correct me if I am wrong).
Okay. :) I thought that too for 20 years, but it's wrong. I was corrected a couple of years ago by Mark Waddingham when I reported an erroneous bug against it.
Logic and intuition both told me that each message would fire sequentially as stack parts were loaded into memory. I operated on that assumption forever. Turns out it isn't true. The whole stack is loaded completely, THEN the messages are sent. To paraphrase Mark, "otherwise there wouldn't be any card to send the messages to."
Right. Duh. But then, I always feel a little stupid after talking with him.
What I do if I do not want the end user to see a bunch of setup stuff like showing and hiding objects on a card, is I put a lock screen in the preOpenCard handler, then I do all my setup stuff in the openCard handler. As soon as all the scripts are done, the screen will automatically unlock and refresh.
Shouldn't be necessary. I never bother. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode