like pass, but without ending the handler

Chipp Walters chipp at chipp.com
Wed Feb 28 15:25:42 EST 2007


I have a question which is a variant of the same type of thing.

Here's what I'm trying to do. I've created (with Chris's help) an
application which communicates with Python via text files and
callbacks.

It basically works like this:

Rev writes a Python script to folder 'test'
Python polls for script, find it, runs it and writes the result in
folder 'test2'
Rev reads it and displays the result.

In order for Rev to display the result, the originating script
generator handler exits, then Rev polls the folder and then reads the
result and returns via a 'callback' it to the originating control.

So, a basic script on Rev would look like this:

on mouseUp
   --> MY LIBRARY NEEDS tID TO KNOW WHERE TO SEND CALLBACK
   put the long ID of me into tID
   --> BELOW HANDLER RESIDES IN MY LIBRARY
   GetSomethingFromPython tID
end mouseUp

on receiveCallback pResult
   answer pResult
end receiveCallback

So, the question is, how can I write a handler even more generic than
above? IOW, without having to have the callback code.

I'd prefer to have:

on mouseUp
   put GetSomethingFromPython() into tMyVar
end mouseUP

Any ideas?

best,
Chipp



More information about the use-livecode mailing list