Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 09 SEP 2020 10:09:32PM Barry Stevens wrote:

Should this still work in OI10, as it does not seem to be.

* the form designer does not support events for popup

	* menus (those menu items which have sub-menu items), so

	* use EVENTQUALIFIER to route events from the EDIT menu

	* to the window's OMNIEVENT

	Qualifier = 2: "*": @appid<1>: "*OMNIEVENT*": @window: "."

	.Menu.Edit->EventQualifier = Qualifier

If not, how do i generate the OMNIEVENTevent for the menu popup. (The event is diabled in the menu designer, which I thought was bit strange if there was actually a workaround)

I am trying do trap the 'Edit' and enable/disable the cutcopy/paste based on the focus status and clipboard.


At 10 SEP 2020 07:33AM Carl Pates wrote:

Barry,

You can use the form's DROPDOWNMENU event to handle this sort of thing. it fires whenever a menu is about to be displayed and allows you to alter the structure if you wish. This is how the IDE adds the MRU items to it's File menu for example.

It passes two arguments:

 MenuID - contains the ID of the MENU item that is about to display it's popup
 MenuStructure - Structure to be displayed.  You can alter this as you wish.

It will run a quick event before displaying the dropdown so you can handle it in a commuter module. You can prevent a menu from showing by using Set_EventStatus( TRUE$) just like you would to prevent a form closing.

Carl Pates


At 10 SEP 2020 03:08PM Barry Stevens wrote:

Barry,

You can use the form's DROPDOWNMENU event to handle this sort of thing. it fires whenever a menu is about to be displayed and allows you to alter the structure if you wish. This is how the IDE adds the MRU items to it's File menu for example.

It passes two arguments:

 MenuID - contains the ID of the MENU item that is about to display it's popup
 MenuStructure - Structure to be displayed.  You can alter this as you wish.

It will run a quick event before displaying the dropdown so you can handle it in a commuter module. You can prevent a menu from showing by using Set_EventStatus( TRUE$) just like you would to prevent a form closing.

Carl Pates

Thank you.

I assume this is still waiting to be documented in the help, or am I looking in the wrong place.


At 10 SEP 2020 04:14PM Carl Pates wrote:

Waiting to be documented.

The reason for the difference is that the older version is basically a "hack" - it requires an event script and it has to be jammed in by overloading another event, which completely breaks the "normal" OI Form programming paradigm.

Carl Pates


At 10 SEP 2020 09:43PM Barry Stevens wrote:

Waiting to be documented.

The reason for the difference is that the older version is basically a "hack" - it requires an event script and it has to be jammed in by overloading another event, which completely breaks the "normal" OI Form programming paradigm.

Carl Pates

Great, it works well

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/315a015e5ad8bb4d88800ba8a5d776d7.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1