• 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
NSPredicateEditorRowTemplate and dynamic popups
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPredicateEditorRowTemplate and dynamic popups


  • Subject: NSPredicateEditorRowTemplate and dynamic popups
  • From: Dave DeLong <email@hidden>
  • Date: Fri, 13 Nov 2009 09:48:35 -0700

Hi everyone,

I have an NSPredicateEditor, with some standard row templates.  I'd like to add a custom row template with three views:  a popup button (indicating the attributes this template references), a second popup button (with the operators), and a third popup button that's populated with a list of possible values.

This is very similar to a regular row template, except that the list of possible values is computed at runtime and can change periodically based on system events.

I've tried subclassing NSPredicateEditorRowTemplate, overriding -templateViews, and returning my 3 popup buttons (all properly populated).  This works once, but after the row is created, I haven't been able to figure out how to repopulate the popup button when the list of possible values changes.  I've tried setting the popup button's menu's delegate to an object that will repopulate it, but the delegate methods are never called.

I've also seen that when there's only one possible value, my popup button is replaced with a textfield.  I suppose that's OK, except that if the list of possible values changes, I need that textfield to change to a popup button.

How can I achieve my dynamic popup button in an NSPredicateEditorRowTemplate?

Thanks!

Dave DeLong

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: NSPredicateEditorRowTemplate and dynamic popups
      • From: Jim Turner <email@hidden>
  • Prev by Date: Re: CPU sampling and +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:]
  • Next by Date: Re: CGImageRef printing issue
  • Previous by thread: LSOpenFromURLSpec() returns -10825 on Tiger
  • Next by thread: Re: NSPredicateEditorRowTemplate and dynamic popups
  • Index(es):
    • Date
    • Thread