Page 1 of 1

what do you do when you are bored?

Posted: Sat Aug 18, 2012 5:17 pm
by shaosean
i was bored the other night at work and thought to myself "how come custom controls can't be called like first class controls?".. this is what i came up with < http://shaosean.tk/runrev/rnd/screencap ... andler.mp4 >

the two buttons are calling the "pig" command in the button "targetControl".. standard rev way is using send (I guess I could have used dispatch, but the idea is the same).. my way, well, you can see the code [if you can't, the code is posted here as well]

targetControl

Code: Select all

on pig
  answer "squeal"
end pig
standard rev way

Code: Select all

send "pig" to control "targetControl"
shaosean's way

Code: Select all

targetControl "pig"
you can pass an arbitrary amount of parameters as well.. will work on doing functions next week.. i was working on a dot notation version, but rev crashed.. i wonder if the engine objected ;-)

Re: what do you do when you are bored?

Posted: Sat Aug 18, 2012 8:35 pm
by Dixie
:D Interesting !... perhaps boredom at work should set in more often..

be well

Dixie

Re: what do you do when you are bored?

Posted: Sun Aug 19, 2012 3:48 pm
by shaosean
Oh god it happens more than you could imagine ;-)

Re: what do you do when you are bored?

Posted: Fri Mar 29, 2013 6:19 am
by shaosean
Finally got back to this and managed to get dot notation working ;-)