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?

Shari, I think your scheme failes because resizestack is called in the opening sequence and overwrites the saved values. I ran into this in one of my programs. If I recall, I used a global that is set after the opening ritual and the prefs file is modified only if this global says we are in normal execution mode. I posted the sequence of opening events in the thread discussing plugins not so long ago.


Robert Brenstein
_______________________________________________
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard

Reply via email to