On Aug 8, 2006, at 8:24 AM, Ian McKnight wrote:

get randomTime(5,2)
put the result


send "get randomTime(5,2)" to group "analogClock"
put the result

It seems Rev has a limited compiler when it comes to 'send'. I'm not even sure what the meaning of 'get' would be in the above situation.

Your best bet would be to go with something more traditional.

First decide whether you want a function or a custom command.

For a function you would do this:

put randomTime(5,2)
  -- or
get randomTime(5,2)
put it

(You might be able to use value() to eval in the group, but that is to distracting for this email.)

For a custom command (made with 'on') you would do this:

randomTime 5,2 -- No Parens!
put the result

send "randomTime 5,2" to group "analogClock"
put the result -- will not work with 'in time'

Normally, 'the result' is used for errors, but it doesn't have to be. It is a handy way to get results from objects you send to. You can also return values with globals or with getProp.

The description of the function sounds like something that should be a function, so I'd wonder why it isn't in the message path of the object that needed it. If it is used by a control in the group, then the group is in the message path.

Dar Scott

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to