Rev suport user defined events?
Randall Reetz
randall at randallreetz.com
Sun May 17 01:23:43 EDT 2009
No answer? Maybe i should make my question more clear...
I would like to write code that reacts dynamically to any changes made to objects in any stack. I would like to do this without polling (without running a constant backround loop that checks every property of every object). In order to do this efficiently, i would have to recieve legitimate events from the interpreter... as the changes are made. But not every property generates a message when it is changed. Button and fields respond as a matter of course to user interaction (messages are sent). But many more properties do not generate events when they are set or changed. As a result, a scripter has to detect these changes and react to them within each of the scripts they write. This is cumbersome to say the least.
If there was a convention for specifying which properties to watch... Which property changes that will initiate messages, then the programmer could write general purpose handlers to catch said event messages, greatly simplifying dynamic environment authoring.
Such a system could be used to customize the official event monitoring loop such that the interpretor would only pay attention to events of interest to a given stack.
One would "track" a prop
-----Original Message-----
From: "Randall Reetz" <randall at randallreetz.com>
To: "How to use Revolution" <use-revolution at lists.runrev.com>
Sent: 5/15/2009 8:50 AM
Subject: Rev suport user defined events?
Can one tell rev to watch for and send an event associated with any property delta?
on setupevents
track fillpat
end setupevents
on fillpat, target
do something to target
end fillpat
-----Original Message-----
From: "Randall Reetz" <randall at randallreetz.com>
To: "How to use Revolution" <use-revolution at lists.runrev.com>
Sent: 5/14/2009 8:36 PM
Subject: RE: Arrow Keys moving Objects
Actuall, in supercard the universal property is called "textarrows". If it is on, edit mode won't nudge objects with arrowkey input.
-----Original Message-----
From: "Joe Lewis Wilkins" <pepetoo at cox.net>
To: "How to use Revolution" <use-revolution at lists.runrev.com>
Sent: 5/14/2009 7:08 PM
Subject: Re: Arrow Keys moving Objects
Thanks Guys. Just glad my memory hadn't gone on the fritz. I still
can't see why it's not working for me now, but not worth worrying
about so long as I know it'll eventually work.
Joe Wilkins
On May 14, 2009, at 6:48 PM, Randall Reetz wrote:
> Right, the official object of focus isnt influenced by what the
> developer or user is looking at at any particular moment (no matter
> how hard one looks at something). This has tripped me up a million
> times. Then the question is how to make sure (by script) that the
> object of interest is the object of focus.
>
> -----Original Message-----
> From: "Terry Judd" <tsj at unimelb.edu.au>
> To: "How to use Revolution" <use-revolution at lists.runrev.com>
> Sent: 5/14/2009 6:21 PM
> Subject: Re: Arrow Keys moving Objects
>
> Joe - the arrow keys work fine here with 3.5. Are you sure there isn't
> something else that has focus (like a field in the property
> inspector or the
> message box) that could be eating up the arrowkey message?
>
> Terry...
>
>
> On 15/05/09 11:06 AM, "Joe Lewis Wilkins" <pepetoo at cox.net> wrote:
>
>> Whom-so-ever:
>>
>> I seem to recall that if you have an object selected in the IDE that
>> you can adjust its location a pixel at a time with the arrow keys. In
>> 3.5 it no longer does that. Is there a preference someplace that
>> turns
>> that off?
>>
[truncated by sender]
More information about the use-livecode
mailing list