Re: NSMenuItem & NSRuleEditor
Re: NSMenuItem & NSRuleEditor
- Subject: Re: NSMenuItem & NSRuleEditor
- From: Jon Hull <email@hidden>
- Date: Sat, 26 Sep 2009 13:45:29 -0700
It is called. I just figured out a workaround... apparently if I pass
it a string NSRuleEditor will create a menuItem for me. Just tested
and it is working now. The documentation is so bad on this area,
maybe I will post some example code when I get it all worked out...
Thanks for your help :-)
Jon
On Sep 26, 2009, at 1:27 PM, Andy Lee wrote:
On Sep 26, 2009, at 4:09 PM, Jon Hull wrote:
• I can get the NSRuleEditor to display menuItems from a popup
loaded from the XIB (as in the example I found)
• I can load in the plist and confirm that the resulting dictionary/
array structure as well as the return values for the #ofChildren
method are correct
But when I create an NSMenuItem programmatically instead of
grabbing a pre-made one, no menu shows up in the rule editor (only
blank rows)...
[...]
- (id)ruleEditor:(NSRuleEditor *)editor child:(NSInteger)index
forCriterion:(id)criterion withRowType:(NSRuleEditorRowType)rowType
Did you check whether this method is actually called -- not just
that your data structure is what you think it is, but that this
method is being executed? The typical suggestion here would be to
make sure you remembered to connect your object as the delegate of
the rule editor.
--Andy
_______________________________________________
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