Using the new Intuition menus. When I do a loop to remove 15+ items (not all in same NM_Menu), then add back 15+ new ones (not all in same NM_Menu), the menu strip isn't always filled in (at least visually) all the way (some items missing). If I put a Delay(TICKS_PER_SECOND/4) between removal and addition it fills in properly. It works fine with a few items removed/added.
Just an FYI.
Menu refresh too slow
Menu refresh too slow
Workbench Explorer - A better way to browse drawers
- thomasrapp
- Posts: 310
- Joined: Sat Jun 18, 2011 11:22 pm
Re: Menu refresh too slow
You probably have to call ClearMenuStrip before you change something and SetMenuStrip afterwards. I suppose that rules have not changed for the new menu system.
- broadblues
- AmigaOS Core Developer
- Posts: 600
- Joined: Sat Jun 18, 2011 2:40 am
- Location: Portsmouth, UK
- Contact:
Re: Menu refresh too slow
@Thomas
I'm not 100% sure I but think that menuclass should handle that for you. It certainly does handle it for hiding and displaying items already on the list.
@Mritter
Did you use SetAttr and the MA_Remove MA_Add tag or the methods OM_ADDMEMBER and OM_REMOVE ? Although it says they are 100% equivalent, my gut instinct would be to use the methods on a menu if it's attached. One reason being the return type is checkable which implies it must have waited for the action to take place.
For large modifications, it's likely more efficient to remove the menu first though, whether required for individual operations or not as a layout would hapen with each change.
If you can provide a sample of the code createing the error that would be very helpful.
I'm not 100% sure I but think that menuclass should handle that for you. It certainly does handle it for hiding and displaying items already on the list.
@Mritter
Did you use SetAttr and the MA_Remove MA_Add tag or the methods OM_ADDMEMBER and OM_REMOVE ? Although it says they are 100% equivalent, my gut instinct would be to use the methods on a menu if it's attached. One reason being the return type is checkable which implies it must have waited for the action to take place.
For large modifications, it's likely more efficient to remove the menu first though, whether required for individual operations or not as a layout would hapen with each change.
If you can provide a sample of the code createing the error that would be very helpful.