• 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: Java-Cocoa: NSMenuItem.separatorItem()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java-Cocoa: NSMenuItem.separatorItem()


  • Subject: Re: Java-Cocoa: NSMenuItem.separatorItem()
  • From: Manfred Schwind <email@hidden>
  • Date: Sun, 18 Jul 2004 16:29:56 +0200

I'm not entirely sure what you mean, but I have used the separator item in a Cocoa Java app with no problems, like this

TheMenu.addItem(new NSMenuItem().separatorItem());

Ah. OK, this may work ... thanks! But it makes little sense to me (because of that I did not even try it this way ;-)).
I still wonder why separatorItem is an instance method in Java while it is a class method in Obj-C.
But maybe I'm too pedantic here. ;-)

Your Java code line above would be something like this in Obj-C:

[theMenu addItem:[[[[NSMenuItem alloc] init] autorelease] separatorItem]];

(This does not work in Obj-C this way, of course.)

Bye,
Mani
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Java-Cocoa: NSMenuItem.separatorItem() (From: Manfred Schwind <email@hidden>)
 >Re: Java-Cocoa: NSMenuItem.separatorItem() (From: Moray Taylor <email@hidden>)

  • Prev by Date: Re: Image Algorithms?
  • Next by Date: NSTableView dataSource & delegate connection newbie question
  • Previous by thread: Re: Java-Cocoa: NSMenuItem.separatorItem()
  • Next by thread: SMySQL
  • Index(es):
    • Date
    • Thread