editScript, revEditScript

Alex Rice alex at mindlube.com
Wed Nov 12 10:27:49 CST 2003


On Nov 12, 2003, at 8:20 AM, xbury.cs at clearstream.com wrote:

> Well, there seems to be no support for the plug-in message in that
> frontscript.
> Either it's not there, or still be be scripted!

Here is what I'm doing for my MLXEditor plugin. Not sure why I used 
editScript instead of revEditScript. This was all I could get to work I 
guess.

-- in the stack script
on preOpenStack
   -- ...
   -- wait for IDE to finish inserting it's scripts
   -- we need to intercept the editScript command before any other script
   send "doInit" to me in 1 sec
end preOpenStack

on doInit
   insert the script of card "frontScript" of stack "revMLXEditor" into 
front
   -- ...
end doInit

-- in the card "frontScript" script:
on editScript pID
   if the debugContext <> empty then
     pass editScript -- use builtin script editor/debugger
   end if
   if the shiftKey = "down" then
     pass editScript -- use builtin script editor
   end if
   -- default to external script editor
   send "doEditScript pID" to stack "revMLXEditor"
end editScript


Alex Rice <alex at mindlube.com> | Mindlube Software | 
<http://mindlube.com>

what a waste of thumbs that are opposable
to make machines that are disposable  -Ani DiFranco



More information about the use-livecode mailing list