Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Disposal of Popup Menus
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disposal of Popup Menus



On Thursday, June 28, 2001, at 09:54 AM, Howard Rodstein wrote:

Question: If I use NewMenu to create a menu, SetControlPopupMenuHandle to associate it with a popup menu, kControlPopupButtonOwnedMenuRefTag to tell the control that it owns the menu and presumably should dispose it, do I need to insert the menu in the menu list ( as recommended by http://developer.apple.com/qa/tb/tb42.html )? Will the control delete the menu from the menu list if it is inserted?

- you won't need SetControlPopupMenuHandle if you use SetControlData with kControlPopupButtonOwnedMenuRefTag. They both do the same thing.

- no, you don't need to insert the menu into the menu list. I think the popup button control has actually always inserted the menu for you if it didn't find it in the menulist already.

- if the menu is already inserted, the control should leave it there

-eric


References: 
 >Disposal of Popup Menus (From: Howard Rodstein <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.