Help on usage of send or call

MisterX b.xavier at internet.lu
Sat May 7 09:45:17 EDT 2005


I've been wondering about this one for ages. Maybe someone can answer...
 
if I have a statement in a card that sends "resizestack" to the stack script
or simply calls resizestack, it simply fails most of the time in an
execution error despite the fargin resizestack statement being where it
should be to be executed.
 
I tried now with 

call "resizestack" of stack "Gim"

and same thing as

send "resizestack" to [stack "Gim" | this stack]

Since stack GIM is in the frontscript and it's the same as mouseup, i tried
to experiment a bit and found out any message can't be sent just like
that...

Incidentally, if you replicate your resizestack message handler as a clone
doresizestack (or whatever), it sends, calls, and even executes without send
or call. So...

The fact i slept through geometry classes, got a's in each test may be a
factor you think?
 
The solution:
on resizeme
  mgmResizeStack
end resizeme
 
on resizestack
  mgmResizeStack
  pass resizestack
end resizeStack
 
on resizestack
  -- put the resizestack code here
end resizestack
 
Anyway, now you can call "resizeMe" from anywhere in RunRev with GIM present
and it will resize your stack automatically.
This is the equivalent to revUpdateGeometry. I also added a infiniteloop
avoider in case you call resizeme from a doresize script which is called by
the mgmResizeStack script in the stack being resized. Just in case!
 
The corresponding calls to revCacheGeometry are saveGeometry and
RestoreGeometry but they're no longuer useful in GIM's dynamic model unless
you have different arrangement styles that you want to record and restore
like panes, etc...
 
GIM 1.1 is out!
Download details
http://www.monsieurx.com/modules.php?name=Downloads
<http://www.monsieurx.com/modules.php?name=Downloads&d_op=viewdownloaddetail
s&lid=79&ttitle=GIM_-_Graphical_Interphace_Manager>
&d_op=viewdownloaddetails&lid=79
 
Release Information:
http://monsieurx.com/forums -> releases -> GIM...
or
<http://www.monsieurx.com/modules.php?name=Forums
<http://www.monsieurx.com/modules.php?name=Forums&file=viewtopic&t=8&sid=8d0
5c293a8954ffdab92cdb1bb825bb6>
&file=viewtopic&t=8&sid=8d05c293a8954ffdab92cdb1bb825bb6>
 
cheers
Xav
 


More information about the use-livecode mailing list