background grps and preOpenCard
J. Landman Gay
jacque at hyperactivesw.com
Wed Oct 19 16:44:48 EDT 2005
Chipp Walters wrote:
> I'm working on a multi-card wizard and came across this and wanted to
> mention a peculiar behavior and see if people thing it's correct.
>
> I create a shared background group over a few cards.
>
> I put in it:
>
> on preOpenCard
> beep
> end preOpenCard
>
> It only gets called on the first card where the group is encountered,
> and none thereafter. IOW, it appears the preOpenCard message is not sent
> to a background group except for the first time it's encountered. If I
> go to a card which doens't have the bgGroup, then back to one that has
> it, the preOpenCard handler gets called again.
>
> Weird.
>
> Just wondering if that seems like *expected* behavior?
No. It should work on every card. This sounds like a similar bug that
Tim Miller found where the engine would only debug a background script
on card 1 of the background. I thought that got fixed though.
That said, I created a small stack with the above preopencard handler in
a background group, and the preopencard handler executed on every card.
So something else is going on. Do you have "backgroundbehavior" set to true?
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list