Possibly this is expected, but...
John Vokey
vokey at uleth.ca
Sun May 25 16:40:25 EDT 2008
I run all my stacks *as stacks* in the MetaCard IDE: that is, I do not
create standalones. I sent a series of my stacks to a colleague to
use, pointing him to StackRunner to download to run my stacks. They
ran in a sense, but not completely. In particular, all the subsidiary
materials (image files, sound files, etc.) for the stacks are
contained in either the same directory containing the stack or in a
sub-directory, and none of these would load when run with StackRunner,
but work just fine in the IDE (and the RR IDE, as well). I set the
path(s) to these subsidiary materials in an openCard handler of the
first card of the stacks, similar to the following:
global thePath,tonepath,datapath,numblocks,theTrials
on openCard
--
-- Get/Set Paths
--
put the filename of this stack into thePath
set the itemdelimiter to "/"
delete the last item of thePath
set the filename of image "theback" to thePath&"/
N44NNBWeb2_goldman.jpg"
put thePath&"/data/" into datapath
put thePath&"/tones/" into tonepath
end openCard
which, as I said, works fine in the IDE.
To make a long story short, I tracked the problem down to a
preopenStack handler of the stack script:
on preopenStack
set the loc of me to the screenloc--centre stack
set the fixstack of this stack to false
hide menubar
set the decorations of this stack to empty
set the backdrop to black
hide stack "Home"
hide message
end preopenStack
*Any* preopenstack handler. That is, the existence of the
preopenstack handler appears to block the generation of the openCard
handler, but only in StackRunner (and in a standalone, if I create
one), but NOT in either the two IDEs. If I remove the preopenstack
handler, everything runs just fine (and the same) in the IDEs and
StackRunner.
I think this is a serious bug (and I'll never recover the hours it
took to track down), but perhaps others have some good explanation for
this marked difference in behaviour between the IDEs and standalones?
Incidentally, passing the preopenstack message at the end of the
preopenstack handler changes nothing: it still works as expected in
the IDEs, but the openCard script is not triggered in StackRunner.
--
Please avoid sending me Word or PowerPoint attachments.
See <http://www.gnu.org/philosophy/no-word-attachments.html>
-Dr. John R. Vokey
More information about the use-livecode
mailing list