• 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: NSMenuItem & NSRuleEditor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSMenuItem & NSRuleEditor (From: Jon Hull <email@hidden>)
 >Re: NSMenuItem & NSRuleEditor (From: Andy Lee <email@hidden>)

  • Prev by Date: NSURLConnection upload to iDisk works with iPhone OS 2.x but fails on 3.x
  • Next by Date: Re: Parsing error in NSEvent?
  • Previous by thread: Re: NSMenuItem & NSRuleEditor
  • Next by thread: Re: NSMenuItem & NSRuleEditor
  • Index(es):
    • Date
    • Thread