Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Live updating NSPredicateEditorRowTemplate?



This (terrible) message usually means that one of your templates contains an empty popup button, which is not allowed.

-Peter

On Dec 10, 2008, at 6:54 PM, Guy Umbright wrote:

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Live updating NSPredicateEditorRowTemplate? (From: Guy Umbright <email@hidden>)
 >Re: Live updating NSPredicateEditorRowTemplate? (From: Peter Ammon <email@hidden>)
 >Re: Live updating NSPredicateEditorRowTemplate? (From: Guy Umbright <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.