Help on scripting languages

Peter McConachie pmccon at bigpond.net.au
Thu Oct 7 09:00:40 CDT 2004


on 7/10/2004 7:52 am, Sean Wilson at snw at paradise.net.nz wrote:

> 
>> It seems to me that Revolution and SuperCard are unique in the way they
>> provide frontScript and backScript functionality to the message path. This
>> allows some unique opportunities.
>> 
>> Can anyone tell me the following:
>> 
>> 2. It does not appear native in Director. Has anyone managed to create a
>> workaround where one can have a script or object other than the normal cast
>> members get first crack at system messages ?
> 
> I'm not familiar with Rev and the other card-based environments, so I'm not
> sure what frontScript and backScript are, but do they bear any relationship
> to Director's mouse(/key)Down(/Up)Script properties for 'intercepting'
> these events?
> 

Sean,
Thanks for the reply

FrontScripts in Revolution and Supercard allow a programmer to intercept all
system messages before they are passed to the object which would be their
normal destination (target). These can be pre-processed and then passed to
the normal target or rejected if inappropriate.

If one wanted, for example, to ensure that certain characters could not be
entered in fields (say because they were reserved delimiters used in
processing strings or database fields) the simplest way would be to put a
rawKeyDown handler in a frontScript to reject the message if it contained
the reserved character(s) or otherwise pass the message  to the normal
target (possibly for further processing). Advantage one script protecting
multiple objects + no chance that any objects created in the future can
break the protocol.

The Revolution rawKeyDown message is probably the same as Directors keyDown.

The requirement to enter text and access databases is a task often performed
in Director/Valentina. For this reason I believe the need is applicable to
non-card based metaphors.

I just dont know if the concept of frontScripting is possible in Director,
and if so how it is done.

Many thanks
Peter McConachie




More information about the Valentina mailing list