Resize stack
Shari
shari at gypsyware.com
Thu Jun 10 13:51:41 EDT 2004
The resizeStack handler (in the stack script) puts the new stack rect
into a file for safekeeping.
on resizeStack
global sPrefs
put the rect of this stack into line 3 of cd fld "Prefs" of cd 1 of
stack sPrefs
save stack sPrefs
end resizeStack
The preOpenStack handler is supposed to retrieve this info, and use it.
on preOpenStack
global sPrefs
put the effective fileName of this stack into sPrefs
set the itemDel to "/"
put "prefs.mc" into the last item of sPrefs
set the itemDel to comma
set the rect of stack "Central" to \
(line 3 of cd fld "Prefs" of cd 1 of stack sPrefs)
end preOpenStack
It fails. As the stack will be a standalone, I cannot set its rect
permanently on resizeStack. So it must retrieve the info from a
preferences stack.
After resizeStack, I verify that the Prefs fld has the new info. All
is well. But somewhere when opening the stack, the "old" info gets
put back into the Prefs file. The resizeStack is apparently called
automatically from Metacard before the new info is handled.
Now I can avoid using the resizeStack altogether and create a
workaround, but that shouldn't be necessary.
Help?
--
Mac and Windows shareware games
http://www.gypsyware.com
More information about the metacard
mailing list