Java-Cocoa: NSMenuItem.separatorItem()
Java-Cocoa: NSMenuItem.separatorItem()
- Subject: Java-Cocoa: NSMenuItem.separatorItem()
- From: Manfred Schwind <email@hidden>
- Date: Fri, 16 Jul 2004 22:39:21 +0200
Hi there,
I am programming a Java-Cocoa GUI for a Java application. Now I wanted
to insert a separator item in an NSMenu, and in the NSMenuItem class I
found the following:
public class NSMenuItem ...
...
public com/apple/cocoa/application/NSMenuItem separatorItem() {
}
...
}
What's this?!? Are there really three errors in this method?
In my opinion it has to be static (a class method), it has to be native
and it should not have an empty implemenation (the implementation has
to be somewhere inside the Java-Cocoa-Bridge as usually).
So in my opinion it should look like this instead:
public class NSMenuItem ...
...
public static com/apple/cocoa/application/NSMenuItem separatorItem();
...
}
Is this a bug? Or is it just not implemented (yet)? Should I file a bug
report?
The corresponding method (selector ;-)) in Obj-C is correctly defined
this way:
+ (id <NSMenuItem>)separatorItem;
I am using the following class method for now, but the name
"_NSObsoleteMenuItemProtocol" does not let me feel good: ;-)
public static native
com/apple/cocoa/application/_NSObsoleteMenuItemProtocol
protocolSeparatorItem();
Casting _NSObsoleteMenuItemProtocol to NSMenuItem seems to work
perfectly in this case.
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.