• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Search Field MenuItem Enabling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Search Field MenuItem Enabling


  • Subject: Re: Search Field MenuItem Enabling
  • From: Seth Willits <email@hidden>
  • Date: Mon, 5 Apr 2004 01:08:54 -0700

On Apr 4, 2004, at 6:07 PM, Philippe Mougin wrote:

I suppose you are using an NSSearchField here (?). If this is the case, here are some info that might help:

Yes.



An NSSearchField has in fact two different NSMenu objects. The template menu and the "real" menu which is actually used on-screen. In the current implementation, the "real" menu is generated and re-generated at various times from the template menu.

Thus, if you modify the template menu after the real menu has been generated, your modification will not impact the real menu immediately. And, if you modify the real menu directly, your modification will be overridden when the real menu is regenerated from the template menu.

In general, you should either modify (or set-up) the template menu before the real menu is generated, or modify both the template menu and the real menu.

Well, I am. I create a menu and set the field's template outlet to the menu. I never modify the template; I only create it in the nib file and connect it.

Have you had success in putting menu items in the field's menu? If so, would you care to write a very small example demonstrating how?


Seth Willits
------------------------------------------------------------------------ ---
President and Head Developer of Freak Software - http://www.freaksw.com
REALbasic Guru at ResExcellence - http://www.resexcellence.com/realbasic
Webmaster for REALbasic Game Central - http://www.freaksw.com/rbgames

"Time goes by so fast, people go in and out of your life. You must never
miss the opportunity to tell these people how much they mean to you."
-- "Cheers"
------------------------------------------------------------------------ ---
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Search Field MenuItem Enabling
      • From: Scott Thompson <email@hidden>
References: 
 >Re: Search Field MenuItem Enabling (From: Philippe Mougin <email@hidden>)

  • Prev by Date: Re: Best way to implement a modal window
  • Next by Date: Re: Best way to implement a modal window
  • Previous by thread: Re: Search Field MenuItem Enabling
  • Next by thread: Re: Search Field MenuItem Enabling
  • Index(es):
    • Date
    • Thread