revxxx messages in plugins

Richard Gaskin ambassador at
Wed Aug 15 11:59:44 EDT 2012

Peter Haworth wrote:

> The problem is, I'm probably going to need a front script anyway because
> plugins don't get revxxx messages for all the events I need to know about
> (e.g., the creation/deletion of a control).  Not sure why the revxxx
> messages are quite so selective.
> I'm also running into issues with some of the revxxx messages. revNewTool
> doesn't happen and revPreOpenStack happens not only when a stack is opened
> but also when it is closed ( I have no idea why that would happen).

Frontscripts are fine.  In fact, I generally recommend them over 
anything provided by the IDE, because engine stuff is both more 
efficient and less subject to change.

There seems to be a design philosophy at play with some of the IDE 
decisions in which they want to make it as user-friendly as a 
conventional productivity app.  Noble as that goal may be, this is a 
development tool; it not only plays by very different rules given its 
radically different nature, but its audience is comprised entirely of 
people with above-average IQs (probably almost exclusively 120 and 
above), as is necessary for effective use of any programming language.

So rather than invent layer upon layer of sugary things to try to make 
life easier for programmers, spend the time instead on just teaching 
them to use the engine effectively.

Besides, such layers add their own complexity which not only introduces 
a greater likelihood of potential bugs, but are themselves things that 
must be learned and accommodated.  (Not to mention the time RunRev has 
to spend writing and maintaining them relative to a few lines in the docs).

Frontscripts are powerful, they are unlimited in number in the IDE, and 
while it's almost always a good idea to pass all messages a frontscript 
traps, that one rule is easy to learn.

Know the engine.
Trust the engine.
Use the engine.


  Richard Gaskin
  Fourth World
  LiveCode training and consulting:
  Webzine for LiveCode developers:
  Follow me on Twitter:

More information about the use-livecode mailing list