Re: Live updating NSPredicateEditorRowTemplate?
Re: Live updating NSPredicateEditorRowTemplate?
- Subject: Re: Live updating NSPredicateEditorRowTemplate?
- From: Peter Ammon <email@hidden>
- Date: Mon, 8 Dec 2008 18:58:56 -0800
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