How to start this project...

Adrian Williams adrian at
Tue Oct 3 13:51:37 EDT 2006

I decided to start with a simple function,
before getting involved with what to do with the return value....

On 2 Oct 2006, at 10:47, Martin Blackman wrote:

> Jacqueline covered it much better than me there. The lookupchar
> function was indeed intended as a separate function for you to write.
> eg. you might do something like this
> -- field "input" contains list of chars which should be replaced, eg 
> "ABC"
> -- field "output" contains your desired output chars in matching 
> order, eg "123"
> function lookupchar tchar
>    get offset (tchar,field "input")
>    if it = 0 then return tchar else \
>            return char it of field "Output"
> end lookupchar
So... I made a new main Stack: lookup.rev,
created three fields: editedText, input, output,
and a button to run the script.

ABC is first line of 'input' field.
123 is first line of output filed.
in field editedText, ABC is entered.
Button is pressed.
Result: "Error in handler"
Hint: function.

This function should work in its own right - yes?

Adrian Williams Design Ltd (trading as Club Type),
44 Mill Lane,
Surrey RH1 3HQ, UK

Telephone/Facsimile: 01737 643300
dFax (computer reception): 0870 0515681

International tel/fax (UK)+44 1737 643300
International dFax:  (UK)+44 870 0515681

Email: adrian at

More information about the Use-livecode mailing list