If I try to create a menu with IM_ITEM, passing a struct Image * created with image.class subclasses in nm_Label, the menu fails to create. Thomas (on UtilityBase) helpfully informed me:
The include file for gadtools states:In V40.4 (OS 3.1 / 3.9) LayoutMenus() simply crashes if a BOOPSI image is used.
However, in the AutoDoc for CreateMenu, it reads as follows:* NOTE: At present, you may only use conventional images.
* Custom images created from Intuition image-classes do not work.
and in image.class it says this:Prior to V39, if you put images into menus using IM_ITEM or IM_SUB for a NewMenu->nm_Type, the image supplied had to be an ordinary struct Image. Starting with V39, you can use boopsi images.
The documentation is at least contradictary, and maybe slightly misleading. Even if I'm doing something wrong, there's definitely a problem here.These images are backwards compatible with the conventional Intuition Images.
Every BOOPSI image has an Intuition Image structure embedded in it so Intuition can access the BOOPSI image as a conventional Image structure when necessary.
Please can somebody confirm:
* Which bits of the documentation quoted above are actually correct?
I don't see how image.class can be backwards-compatible with standard Images yet not be useable for IM_ITEM labels.
* Whether IM_ITEM is supposed to work with BOOPSI images, but due to a long-standing bug it has never worked? (or if it does work I'd be interested to hear that too!)
* Is there a workaround? Is it possible to convert a BOOPSI Image into a standard Image? (even though this shouldn't be necessary)
I have also tried a standard Intuition Image (the one from the RKRM "simple image" example) in my menu, with not much more success. The menu strip does get attached, but the entire menu under which my IM_ITEM item occured does not get constructed.
I'm being to suspect that image menus (IM_ITEM/IM_SUB) don't work at all through GadTools.
However, even poking the Intuition Menu's FirstItem->ItemFill with a BOOPSI or standard struct Image *, before or after LayoutMenus, doesn't work. It must work at this level with standard Images, or even things like checkmarks wouldn't display. So, what am I doing wrong? Some example code would be really helpful!