Page 1 of 1

timer/counter handlers at stack level

Posted: Sat Aug 11, 2007 4:38 am
by homer
ok,

I have made progress.

can I put all my custom handlers in the stack script?

i thought i had to include custom handlers in the object i was using it in?

like

"button777"

on mouseUp
myHandler007
end mouse

on myHandler007
put "9" into fld "888"
end myHandler007

(end of button script)

so, if I put the "myHandler777" in the stack script, I can use it in any object script on any card? at any time?

if that's the case, why would anyone put a custom handler anywhere else?

thanks in advance

homer

Posted: Sat Aug 11, 2007 9:09 am
by Mark
Hi Homer,

You put handlers higher up the message path of different objects send the same message and should execute the same script when the message is issued.

You put handlers into the object scripts if different objects send the same message and should execute different scripts when the message is issues.

Best,

Mark

Posted: Sat Aug 11, 2007 11:37 am
by Klaus
Hi Homer,

I strongly advise to take a very deep look at all the stacks from the online scripting conference at RunRev:
http://downloads.runrev.com/section/scr ... rences.php
Especially the "Message Hierarchy" stack in your case.

And please spread the word :-)

These are invaluable resources for novice and experienced developers.


Best

Klaus