Re: Is NSRuleEditor worth the learning curve?
Re: Is NSRuleEditor worth the learning curve?
- Subject: Re: Is NSRuleEditor worth the learning curve?
- From: Peter Ammon <email@hidden>
- Date: Tue, 31 Jan 2012 14:13:40 -0800
On Jan 28, 2012, at 4:23 PM, Erik Stainsby <email@hidden> wrote:
> Hello list folks,
>
> I'm struggling with the abstraction and sketchy documentation that surround NSRuleEditor. I feel a need to know that the effort is worthwhile, versus cobbling together something in a table or outline view instead.
>
> The domain I am working in really fits well within the structured rule editor model. I have many lists of finite scope which have an inherent hierarchy and each choice made implies filters for the remaining options.
>
> But I am really confused by the highly flexible model of the rule editor. The toughest part right now is that I am unable to see how the NSRuleEditor instance populates a given row, based on having received either a stringValue, a menuItem or a control/view. Where in all of this have I the opportunity to establish the layout and orientation of the various widgets for a given row?
>
> One example I have found (NibBasedSpotlightSearcher.xcodeproj - circa 2006) presents a window in the nib which holds clusters of related controls in a single view. I'm doing the gasping guppy trying to see where in the code those individual controls are addressed, loaded and applied.
>
> Has anyone got a nakedly simple example of a minimalist use of the NSRuleEditor they could point me to?
Hi Erik,
Have you considered using the simpler NSPredicateEditor instead? It's worth taking a look even if your data model is not directly an NSPredicate, as long as you can map to and form NSPredicate.
See the NSPredicateEditorRowTemplate header. NSPredicateEditor populates a row based on calling -templateViews and inserting your views into the row.
-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