On Wed, Apr 24, 2013 at 9:38 AM, Art Heimsoth <[email protected]>wrote:
> Is there a way to define a different method for a MENUITEM than what
> is the default of combining the first operand on the statement? Example:
> MENUITEM "Display Everything", MENUTERM, 0, 0
> would cause method DisplayEverything to be activated - can the MENUITEM
> somehow be defined to cause DisplayOption1 to be activiated instead?
>
You can explicitly name the event handling method you want to be used for
any menu item. But you can not change the method name if you are using
automatic connection of the menu items with the menu being defined in a .rc
file.
For instance with a ScriptMenuBar in the new() method:
>>--new(--rcFile--+------+-+----------+-+---------+-+-----------+-+------------+-)--><
+-,-id-+ +-,-helpID-+ +-,-count-+ +-,-connect-+
+-,-attachTo-+
you would have the connect argument be false, which is the default. And
then use one of the connectCommandXXX() methods to explicity name the event
handling method your want for the menu item(s)
Just to reiterate the point, there is no way to have the menu items
*automatically* connected and use a different event handling method.
>
> Is the syntax of the statements defined somewhere for the RC file?
>
Sure, Microsoft defines it. ;-)
Google 'msdn resources'
The top hit I see is: Menus and Other Resources (Windows) - MSDN - Microsoft
Then follow the link -> Resource Compiler -> About Resource Files
-> Resource-definition statements ->
Then it gets a little difficult to follow. On what I'm looking at there is
a tree structure on the left. You need to find MENU Statement and MENUITEM
statement:
MENUITEM text, result, [optionlist]
With 'result' being a number or something that resolves to a number. This
is the menu item ID. So, for one of the connectCommandXX() methods:
>>--connectCommandEvent(--id--,--methodName--+--------+--)---------------------><
+-,-dlg--+
If result in the definition above was 112 then you would do:
menuObj~connectCommandEvent(112, 'DisplayOption1', dlg)
If that doesn't clear things up for you, then ask some follow up questions.
--
Mark Miesfeld
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Oorexx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-users