On Oct 28, 2006, at 10:21 AM, David Walters wrote:
On 28/10/2006, at 10:22 PM, Rosyna wrote:
Ack, at 10/28/06, David Walters said:
I'm afraid I'm a little slow on the uptake with your answer, and
I tried passing a 0 to every function that required a menuID -
but I couldn't get it to run.
That's because SetMenuItemHierarchicalMenu() doesn't take a menu
id. It takes a MenuItemIndex, you're passing 0, which isn't a
valid index in this case.
Notice the text you quoted from the Menu Manager Reference and the
sample code you pasted. The sample code correctly passes an index
(4). The index is the menu item you want to attach the submenu to.
ok, how do we know that 4 is correct?
I don't have that code in front of me, but 4 is just the fourth menu
item.
I don't see the same mechanics you do because I can't find a reason
why 4 is the correct index to pass in the example from apple.
I noticed Larry was using Appendblahblah instead of Insertblahblah,
for ( int i = 0; i < 5; ++i )
{
InsertMenuItemTextWithCFString( barMenu, mainItems[ i ], 0, 0, 0 );
CreateNewMenu( 0, 0, &subMenu );
InsertMenuItemTextWithCFString( subMenu, subItems[ i ], 0, 0, 0 );
SetMenuItemHierarchicalMenu( barMenu, 1, subMenu );
}
}
and I changed the example and now it works - except for the
submenus on "five"... so I can't get Insertblahblah to work.
I can't tell from this exactly what isn't working.
Larry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden