Splash snafu
Klaus Major
klaus at major-k.de
Tue Dec 23 04:50:16 EST 2003
Hi Ken,
> Howdy,
>
> I open a mainstack splash which does some visual antics (wiil
> eventually
> setup everything), sends itself to an offscreen location, then opens
> the GUI
> project substack.
>
> If I don't open the substack (comment out the last line), it works
> fine, but
> if I open the substack, I get an error:
>
> " executing at 1:23:41 AM
> Type Chunk: can't find background
> Object OutlookInn_Splash
> Line get the loc of group id 1006
> Hint stack "/Macintosh HD/Desktop
> Folder/RevStacks_Mine/OutlookInn_Splash.rev"
>
> ...which refers to 3rd line of the *mainstack* openStack handler. The
> script
> has already executed and is done.
>
> Why is opening the substack trying to rerun the script of the
> mainstack?
>
> The substack has no scripts.
...and thats the point!
Since it has no script of its own, it executes the mainstacks script:
(Substacks do this ;-)
...
> on openStack
> get the screenrect
> set the loc of this stack to ((item 3 of it)/2,(item 4 of it)/2)
## OK
> get the loc of group id 1006
## probably no goup id 1006 in the substack "Outlookinn_Splash"!!!
## ergo: error :-(
> Here's the script:
>
> on openStack
> get the screenrect
> set the loc of this stack to ((item 3 of it)/2,(item 4 of it)/2)
> get the loc of group id 1006
> ...
> set the visible of fld 1 to true
> wait 5
> --open stack "OutlookInn_Top" --Here's the problem
> end openStack
Solution:
put a generic "openstack" handler into the substack like:
on openstack
###
end openstack
...and it will work out fine :-)
Hope that helps...
> TIA,
> Ken N.
Regards
Klaus Major
klaus at major-k.de
www.major-k.de
More information about the use-livecode
mailing list