I was going to update my project's menu from GadTools to Intuition Menu Class from this page
http://wiki.amigaos.net/wiki/Intuition_Menu_Class
I used the SDKBrowser to search for MA_Label to find what includes I need and what other tags exists. Couldn't find it. Manually looked for it. Nope. No Classes/menu.h or Intuition/menus.h.
Is this class still "alive"?
Intuition Menu Class
Intuition Menu Class
Workbench Explorer - A better way to browse drawers
Re: Intuition Menu Class
I was ahead of the game; maybe still am.
With the new SDK I updated my menu. It builds fine, attaches fine, right click it shows the strip, locks up.
intuition.library 54.10.
With the new SDK I updated my menu. It builds fine, attaches fine, right click it shows the strip, locks up.
intuition.library 54.10.
Workbench Explorer - A better way to browse drawers
- broadblues
- AmigaOS Core Developer
- Posts: 600
- Joined: Sat Jun 18, 2011 2:40 am
- Location: Portsmouth, UK
- Contact:
Re: Intuition Menu Class
Any empty menus in that strip ?
There a bug in 54.10 where they will lock up. Fixed in 54.11 when that becomes available.
Otherwise I'm not sure what the issue might be, so can you post s me code you are using?
menuclass works fne in MultiViewer a part from that lockup I mention above when the scripts menu was empty, and I worked arround that by adding a load script item that was always there. (ie never an empty menu any more).
If your menus are dynamic and there a possibilty of them being empty you could arrange your code to hide any empty menus.
[aside] I'm very interested to know what you might be working on, the range and depeth of your codeing questions makes it seem quite an extensive project.
There a bug in 54.10 where they will lock up. Fixed in 54.11 when that becomes available.
Otherwise I'm not sure what the issue might be, so can you post s me code you are using?
menuclass works fne in MultiViewer a part from that lockup I mention above when the scripts menu was empty, and I worked arround that by adding a load script item that was always there. (ie never an empty menu any more).
If your menus are dynamic and there a possibilty of them being empty you could arrange your code to hide any empty menus.
[aside] I'm very interested to know what you might be working on, the range and depeth of your codeing questions makes it seem quite an extensive project.
Re: Intuition Menu Class
It definitely works... there are examples in the SDK Examples/GUI/MenuClass. Try comparing that to your code.mritter0 wrote:I was ahead of the game; maybe still am.
With the new SDK I updated my menu. It builds fine, attaches fine, right click it shows the strip, locks up.
intuition.library 54.10.
@ssolie
On the ContextMenu wiki article it says (my emphasis):
This does not appear to be the case. If you define a shortcut with MA_Key, it doesn't show up in the context menu. Is this a bug, or is the article wrong?wiki wrote: Another significant difference between context menus and normal ones is that a context menu doesn't currently support keyboard shortcuts, as the same context menu can be tied to more than one GUI element, and no way is defined to decide which one of those element should hear the key press. (Intuition still displays the shortcut if you add it to an item, but it will be non-functional.)
Re: Intuition Menu Class
It very well may be something I am doing. My menu is very large and customized. The new one I made is just the basic shell. I am still making both (GadTools and BOOPSI) but only IIntuition->SetMenuStrip(MainWindow,(struct Menu *)MenuStripObj); the new one.
All the customization code is still there and acting on the old menu, even though it isn't attached. That may be (probably) what is causing my problem. It doesn't crash at all until I right click for the menu. Only the top strip is shown, no items (at top of screen and vertical menu down in the window (pop up style)).
I am just a little reluctant to rip all the old code out until I got the basic new menu to work. I have to do it any way, just want to do it in small chunks so I know all is well.
@broadblues
I have been working on my project for 18 months. It is quite large. It is nearing time to get it out to some beta testers. Not ready to say what it is yet. Soon.
All the customization code is still there and acting on the old menu, even though it isn't attached. That may be (probably) what is causing my problem. It doesn't crash at all until I right click for the menu. Only the top strip is shown, no items (at top of screen and vertical menu down in the window (pop up style)).
I am just a little reluctant to rip all the old code out until I got the basic new menu to work. I have to do it any way, just want to do it in small chunks so I know all is well.
@broadblues
I have been working on my project for 18 months. It is quite large. It is nearing time to get it out to some beta testers. Not ready to say what it is yet. Soon.
Workbench Explorer - A better way to browse drawers
Re: Intuition Menu Class
Disregard first paragraph. Solved. Duh.
When I saw this topic I decided to try adding some menus to one of my personal-use programs. I read the WIKI and added a "Project" menu with 2 menu items using the macro method for creating the menu object and added them using IIntuition->SetMenuStrip(). The menu is added but nothing happens when I select the menus. I added some printf output and my input loop is never receiving a WMHI_MENUPICK. When I click on one of the items in my listbrowser the menus that were previously selected and ignored are activated. It seems like Intuition doesn't generate a message for the menu selection but sends the WMHI_MENUPICK flag along with a message generated by another event (like selecting an item in the listbrowser. Is there something that needs to be done to get menu messages?
I didn't have WA_IDCMP, IDCMP_MENUPICK set in the window object creation. The program I added the menus to is really old and it didn't have any WA_IDCMP settings in the window object. The window close gadget message, iconify message and gadgetup messages work without setting any IDCMP flags in the window object. Why would those not be needed but setting a menu IDCMP flag is needed??
When I saw this topic I decided to try adding some menus to one of my personal-use programs. I read the WIKI and added a "Project" menu with 2 menu items using the macro method for creating the menu object and added them using IIntuition->SetMenuStrip(). The menu is added but nothing happens when I select the menus. I added some printf output and my input loop is never receiving a WMHI_MENUPICK. When I click on one of the items in my listbrowser the menus that were previously selected and ignored are activated. It seems like Intuition doesn't generate a message for the menu selection but sends the WMHI_MENUPICK flag along with a message generated by another event (like selecting an item in the listbrowser. Is there something that needs to be done to get menu messages?
I didn't have WA_IDCMP, IDCMP_MENUPICK set in the window object creation. The program I added the menus to is really old and it didn't have any WA_IDCMP settings in the window object. The window close gadget message, iconify message and gadgetup messages work without setting any IDCMP flags in the window object. Why would those not be needed but setting a menu IDCMP flag is needed??
AmigaOne X1000 with 2GB memory - OS4.1 FE
- broadblues
- AmigaOS Core Developer
- Posts: 600
- Joined: Sat Jun 18, 2011 2:40 am
- Location: Portsmouth, UK
- Contact:
Re: Intuition Menu Class
window.class sets up a few IDCMP_#? that it needs but menus are optional so not automatically added.I didn't have WA_IDCMP, IDCMP_MENUPICK set in the window object creation. The program I added the menus to is really old and it didn't have any WA_IDCMP settings in the window object. The window close gadget message, iconify message and gadgetup messages work without setting any IDCMP flags in the window object. Why would those not be needed but setting a menu IDCMP flag is needed??
If it were a plain intuition window, you would need to add all needed IDCMP youself.
- broadblues
- AmigaOS Core Developer
- Posts: 600
- Joined: Sat Jun 18, 2011 2:40 am
- Location: Portsmouth, UK
- Contact:
Re: Intuition Menu Class
Okay so your menus are empty, hence the lockup, that's presumabably not deliberate, unless your really taking small steps as you write the code, so will need some code to help further.Only the top strip is shown, no items (at top of screen and vertical menu down in the window (pop up style)).
I'm guessing filemamanager / workbench replacement am I warm ?@broadblues
I have been working on my project for 18 months. It is quite large. It is nearing time to get it out to some beta testers. Not ready to say what it is yet. Soon.
Re: Intuition Menu Class
I "ripped out" some GadTools code to see if it would help......it did. Not sure why but it is working now. The two must have been fighting each other at some point, even though only one menu was attached to the window.
So, if you intend on upgrading to the new menu system, go all the way at first. Then build in your custom stuff after the menu is up and running.
So, if you intend on upgrading to the new menu system, go all the way at first. Then build in your custom stuff after the menu is up and running.
Workbench Explorer - A better way to browse drawers