background grps and preOpenCard
Dave Cragg
dcragg at lacscentre.co.uk
Wed Oct 19 16:42:34 EDT 2005
On 19 Oct 2005, at 21:22, 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.
It beeps here when I go to any card where the group is placed, even
between card that both have the group. (this is Rev 2.6.1 on OS X)
Do you have the backgroundBehavior property set?
However, if I set backgroundBehavior to false, it doesn't beep at
all, which is what I would expect. Your "beep one time only" sounds
like what should happen from a preOpenBackground handler.
Do you have any other preOpenCard handlers anywhere that might block
this? (in card scripts, or other backgrounds)
Cheers
Dave
More information about the use-livecode
mailing list