On 1/20/11 9:28 AM, Jim Sims wrote:
The revExample stack displays the messages that are sent and that
seems to be all it does.

In the plugin settings I can add messages to the list of messages to
be sent to the plugin.

However, those settings are not saved - when I reopen that plugin it
goes back to the original set of messages.

How does one set a default set of messages to be sent to a plugin?

The purpose of the plugin-specific messages is to help keep the plugin from interfering with the standard message path. By implementing the "special" messages you don't need to insert handlers for messages that other stacks need to use. For example, if you want the plugin to know about all instances when a stack closes, put a "revCloseStack" handler in your plugin. LiveCode will send that message to all open plugins whenever a user stack closes. (You may already know this, but Richard wondered why those messages were there.)

Once you've added any specific handlers you want to use, save your stack, quit LiveCode, and drop your plugin stack into your plugins folder. Restart LiveCode. Open the Plugin Settings and select the handlers you've implemented. This puts a custom property into your plugin stack but I don't think it auto-saves the stack. It's been a while so I could be wrong.

If it doesn't, then save your stack manually (from the message box is okay). I think you need to relaunch again to load the saved version, and after that your plugin will catch any of the special messages and can respond to them.

If your plugin does not need to know about any of the actions in the list, don't write handlers for them and just ignore them. My custom plugins are mostly set to just be in the menu and open on demand.


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

Reply via email to