• 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
Filtering NSPopUpButtonCell when clicking on it
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Filtering NSPopUpButtonCell when clicking on it


  • Subject: Filtering NSPopUpButtonCell when clicking on it
  • From: Kubernan <email@hidden>
  • Date: Thu, 15 Jan 2009 12:04:14 +0100

Hello,

In my outline view i have a NSPopUpButtonCell for which the table column is bound
to a NSArrayController that contains coredata entities.


The goal is to restrict the content of items in the pop up cell depending on
other attributes of the row.


So i decided to call the setFilterPredicate: of the array controller as soon as the user
click on the pop up cell and of course before the content of this pop up is displayed.


For that it seems i could use (BOOL)trackMouse:(NSEvent *)theEvent inRect:(NSRect)cellFrame ofView:(NSView *)controlView untilMouseUp: (BOOL)untilMouseUp in a subclass of NSPopUpButtonCell. But this method appears to me
little bit complex for my simple need and the documentation says "This method is generally not overridden because the default implementation invokes other NSCell methods that can be overridden to handle specific events in a dragging session."


My question is what methods and strategy should i use for setting the predicate of my array controller before
the content of the pop up cell is displayed ?


Thanks a lot for your help,

Kub.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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


  • Follow-Ups:
    • Re: Filtering NSPopUpButtonCell when clicking on it
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: NSImage resizing
  • Next by Date: NSDictionary key from the content of a set
  • Previous by thread: Using an NSOpenGLVIew to play a Quartz composition with QCRenderer
  • Next by thread: Re: Filtering NSPopUpButtonCell when clicking on it
  • Index(es):
    • Date
    • Thread