• 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: Live updating NSPredicateEditorRowTemplate?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Live updating NSPredicateEditorRowTemplate?


  • Subject: Re: Live updating NSPredicateEditorRowTemplate?
  • From: Guy Umbright <email@hidden>
  • Date: Wed, 10 Dec 2008 20:54:23 -0600

As I mentioned, I can get new rows to add with an updated list via the code attached to the OP. The problem is that if I uncomment the "[_editor reloadCriteria];" line the last popup of the initial row doesn't paint and I get the following message in the debug console:

"2008-12-10 20:49:41.050 prededit[12581:813] In <NSPredicateEditor: 0x126340>, different number of items (2) than values (3)"

Guy

On Dec 8, 2008, at 8:58 PM, Peter Ammon wrote:


On Dec 8, 2008, at 6:37 PM, Guy Umbright wrote:

I am trying to create an NSPredicateEditorRowTemplate with its last view a popup that contains a list of things (elsewhere in the window) that can be updated while the editor is being displayed. I can get it so that I can add an instance of the template, update the list of items and add another instance which shows the updated list, but the original does not update.

For example, the original templates specifies A,B,C in the last popup. I add a row with that template then I add a D to the list of items and then add another row to the Predicate Editor. This new row will show me a list of A,B,C,D but the original row still just shows A,B,C.

Is there a way to resync that existing row with the new list of items in its source template? Am I going to have to remove and re- add the row programmatically?

You should call -[NSPredicateEditor setRowTemplates:] with an array containing the new template (but not the old one). If you want to preserve the predicate, you may have to save off the predicate via - objectValue, and then set it back; or alternatively calling reloadCriteria should work.


-Peter


_______________________________________________

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: Live updating NSPredicateEditorRowTemplate?
      • From: Peter Ammon <email@hidden>
References: 
 >Live updating NSPredicateEditorRowTemplate? (From: Guy Umbright <email@hidden>)
 >Re: Live updating NSPredicateEditorRowTemplate? (From: Peter Ammon <email@hidden>)

  • Prev by Date: Re: Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel?
  • Next by Date: Undo for non-document based applications
  • Previous by thread: Re: Live updating NSPredicateEditorRowTemplate?
  • Next by thread: Re: Live updating NSPredicateEditorRowTemplate?
  • Index(es):
    • Date
    • Thread