Welcome, Guest. Please Login
Rorohiko Workflow Resources
  Welcome the Message Board of Rorohiko Workflow Resources. To register, please e-mail [email protected] - automatic registration has been turned off because of relentless spambots and spammers. This Message Board is not actively monitored. If you have an urgent question, please e-mail [email protected]. If you post it here, it will probably be many weeks before we notice.
  HomeHelpSearchLogin  
 
Page Index Toggle Pages: 1
Send Topic Print
Context menus w/o selection (version>=1.0.46) (Read 8421 times)
Kris Coppieters
YaBB Administrator
*****
Offline



Posts: 181
New Zealand
Gender: male
Context menus w/o selection (version>=1.0.46)
10/16/08 at 20:59:52
 
To add context menus that appear without anything selected, you need to create a .spln file (a scripted plugin). Ideally, you'd start by opening the APIDTemplate.indd file, creating a project setup, and taking it from there.

Once you have a proper .spln setup that you can compile to, you can start handing these context menus. The main difference with normal context menus as documented in the APID documentation is that the events are sent directly to the scripted plug-in object instead of to a selected page item.

When your scripted plugin gets a 'loadContextMenu' event, you should build a table that represents the context menu and return it via theScriptedPlugin.tempDataStore - just like you would normally handle 'subjectLoadContextMenu' events for other objects.

When your scripted plugin gets an 'enableMenus' event, it should return a non-zero status value for any event that need to appear in the context menu - just like you would handle normal menu items.

And lastly, the scripted plugin needs to handle any event codes assigned to these context menus.

It's a bit complex to explain in just words. Instead you can download an extensive code sample from

http://www.rorohiko.com/downloads/MenuDemo.zip

This sample shows a number of aspects of menu handling with APIDToolAssistant, as well as how to put check marks in front of menu items.
Back to top
« Last Edit: 10/16/08 at 22:09:49 by Kris Coppieters »  

Kris
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print