[comp.sys.mac.hypercard] Setting userlevel on startup or ope

lnk287@uxf.cso.uiuc.edu (10/16/88)

Working with OpenStack and Startup handlers _can_ be tricky, as you've 
found out.  One thing that might help your handler run is to make SaveLevel
a global variable so that your stack will be able to get to it.  You might 
want to put the storage fragment in the OpenCard handler of your FIRST card,
HyperCard will always open the first card when you open the stack for the
first time.  Then use the CloseStack handler to reset the level.  Like so:
 
{ card script of the first card }
on openCard
  global saveLevel
  put the userLevel into saveLevel
end openCard
 
{ stack script }
on closeStack
  global saveLevel
  set the userLevel to saveLevel
end closeStack
 
Hope that helps!
 
Louis Koziarz - UIUC (lnk287.uxf.cso.uiuc.edu) 
$B7 $B8