here's something that i noticed the other day (haven't seen anything reported about it 
on this list so thought i'd share)

the docs for Rev state that the message path goes like so:
1. control
2. groups (if there's any)
3. current card
4. stack

now trying to do any form of complex work in the starter kit takes some serious 
planning and many searches through the reference guide..

in my current project i was just using the "send" command to tell the other controls 
what handler to run, but i realized that i needed the controls to "return" whether 
they were successful or not..

i took a look at using the "insert script" command, but in the IDE i kept running out 
of room at the "back", as Rev uses a few slots in there (which count towards our 10), 
so i decided to insert the scripts into the "front", but Rev uses some there too 
(which also count towards the 10)..

yes i could work around this, but i also thought of other developers who may actually 
be incorporating my code into their stack(s) and who may actually be using all the 
slots in the front and back.. 

what to do? well that's where all the above is leading to..

by exploiting the message path i was able to create as many functions (same as 
handlers, but usually return) as i required without using any of the front or back 
script slots, nor with using any globals, custom properties, etc..

here's how..

1. create any type of control (i find push buttons the best)
2. put the newly created control into it's own group
3. in the group's script put your code
4. from any control/script you can now just call the function/handler as if it were 
inserted, or a local function/handler in the control/script

example:
button "square"
on mouseUp
 answer f_square(4)
end mouseUp

group "group_square"
function f_square pParam
 return pParam * pParam
end f_square

i'll build a quickie stack to show this and will send it to the staff at runrev..

--  
-Sean


ps.. sorry, i usually like to explain how things can be beneficial to others so am 
usually a little wordy..

Reply via email to