When do certain scripts run?
sarah.reichelt at gmail.com
Sun Oct 9 21:41:54 CDT 2005
On 10/10/05, Ian Leigh <ianl at mac.com> wrote:
> I am putting together a simple program which scans a directory and
> lists the files contained therein in a scrolling list field. I am
> wondering when the script of that field would actually get called?
> For example, I would like to put a filter on it but I can't do it by
> putting the filter command in the script for the field, which seems a
> bit illogical. At that point are scripts for a scroll list actually run?
Revolution is event-driven, so a handler needs to be triggered by a
particular event. e.g. when you script a button, you use the mouseUp
event to tell the button to do it's stuff when the mouse button is
released over the button.
For your field, it depends what your script is for. If you want to do
something based on a selection, then use a mouseUp handler. If you
want to apply a filter then you probably have another field where the
filter can be typed, so use a rawKeyUp handler in that filter field so
that every time a key is pressed & released, the filter is applied.
More information about the use-livecode