Re: Java-Cocoa: NSMenuItem.separatorItem()
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.