Re: revxxx messages in plugins

2012-08-15 Thread Richard Gaskin

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: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: revxxx messages in plugins

2012-08-15 Thread Peter Haworth
Good to hear.  I always get concerned that I might be going in the wrong
direction when I discover a new way of doing something that duplicates an
existing method.  I already have fornt scripts in place so will stick with
them.
Pete
lcSQL Software http://www.lcsql.com



On Wed, Aug 15, 2012 at 8:59 AM, Richard Gaskin
ambassa...@fourthworld.comwrote:

 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.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: revxxx messages in plugins

2012-08-15 Thread Bob Sneidar
I've been told my IQ is probably as high as my age, so I guess I'm almost half 
smart! 

On Aug 15, 2012, at 8:59 AM, Richard Gaskin wrote:

 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.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


revxxx messages in plugins

2012-08-14 Thread Peter Haworth
I'm confused about the purpose of these messages.  As an example, consider
the revPreOpenStack and its equivalent preOpenStack

If I register my plugin to receive revPreOpenStack messages, then I get
that message when any stack is opened in the IDE which is great but is
there any advantage to doing it that way rather than having a preOpenStack
handler in a front script?

If it's better to use the revxxx messages than a front script, is there any
way to pre-configure a plugin to receive selected revxxx messages before I
give it to a customer?

Thanks,

Pete
lcSQL Software http://www.lcsql.com
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: revxxx messages in plugins

2012-08-14 Thread J. Landman Gay

On 8/14/12 8:23 PM, Peter Haworth wrote:

I'm confused about the purpose of these messages.  As an example, consider
the revPreOpenStack and its equivalent preOpenStack

If I register my plugin to receive revPreOpenStack messages, then I get
that message when any stack is opened in the IDE which is great but is
there any advantage to doing it that way rather than having a preOpenStack
handler in a front script?


Using the plugin messages is less likely to interfere with the user's 
setup and message hierarchy, and ensures your plugin will always receive 
messages (frontscripts can be overridden by other frontscripts.) The rev 
messages were implemented to allow plugins to react to IDE events in a 
structured way.




If it's better to use the revxxx messages than a front script, is there any
way to pre-configure a plugin to receive selected revxxx messages before I
give it to a customer?


The settings are saved in a custom property of the plugin stack. As long 
as the user doesn't remove or change the settings, they will travel with 
the stack.



--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: revxxx messages in plugins

2012-08-14 Thread Peter Haworth
Thanks Jacque.

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).

Pete
lcSQL Software http://www.lcsql.com



On Tue, Aug 14, 2012 at 7:43 PM, J. Landman Gay jac...@hyperactivesw.comwrote:

 On 8/14/12 8:23 PM, Peter Haworth wrote:

 I'm confused about the purpose of these messages.  As an example, consider
 the revPreOpenStack and its equivalent preOpenStack

 If I register my plugin to receive revPreOpenStack messages, then I get
 that message when any stack is opened in the IDE which is great but is
 there any advantage to doing it that way rather than having a preOpenStack
 handler in a front script?


 Using the plugin messages is less likely to interfere with the user's
 setup and message hierarchy, and ensures your plugin will always receive
 messages (frontscripts can be overridden by other frontscripts.) The rev
 messages were implemented to allow plugins to react to IDE events in a
 structured way.



 If it's better to use the revxxx messages than a front script, is there
 any
 way to pre-configure a plugin to receive selected revxxx messages before I
 give it to a customer?


 The settings are saved in a custom property of the plugin stack. As long
 as the user doesn't remove or change the settings, they will travel with
 the stack.


 --
 Jacqueline Landman Gay | jac...@hyperactivesw.com
 HyperActive Software   | http://www.hyperactivesw.com

 __**_
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/**mailman/listinfo/use-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode