Re: Must remove submenu when dealloccing NSMenuItem?
Re: Must remove submenu when dealloccing NSMenuItem?
- Subject: Re: Must remove submenu when dealloccing NSMenuItem?
- From: Jerry Krinock <email@hidden>
- Date: Thu, 22 Feb 2007 09:23:49 -0800
- Thread-topic: Must remove submenu when dealloccing NSMenuItem?
on 07/02/22 7:54, Michael Nickerson at email@hidden wrote:
> Does it change things if you do it this way instead? Set up your
> bookmarksHierarchicalMenu the same way, but don't use [menuItem setSubmenu:],
> then...
>
> [menuItem setTag:2];
> [menu addItem:menuItem];
> [menu setSubmenu:bookmarksHierarchicalMenu forItem:menuItem];
> [menuItem release];
> [bookMarksHierarchicalMenu release];
Interesting idea, Michael. I just tried it.
RESULT: Still the same.
****** REVISED CODE SNIPPET FROM XCODE **************
[menuItem setTag:2] ;
[menu addItem:menuItem];
[menuItem release];
bookmarksHierarchicalMenu =
[[SSMenu alloc] initWithOwningMenuItem:menuItem] ;
[bookmarksHierarchicalMenu setDelegate:
[self bookmarksHierarchicalMenuDataSource]] ;
[menu setSubmenu:bookmarksHierarchicalMenu forItem:menuItem] ;
[bookmarksHierarchicalMenu release] ;
I'm going to study Andy's test project now.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden