Re: Java bridge: Java method with 2 arguments
Re: Java bridge: Java method with 2 arguments
- Subject: Re: Java bridge: Java method with 2 arguments
- From: p3consulting <email@hidden>
- Date: Fri, 13 Feb 2004 09:19:34 +0100
By calling [data setValue:@"FirstPart" :43.2];
you ask the Java bridge to look for a Java method
setValue(String, float);
or
setValue(String,double)
yours is
setValue(Comparable,Number)
at least you should try
[data setValue@"FirstPart" :[NSNumber numberWithFloat:43.2]];
depending how Comparable is defined you may have to convert from
NSString to an equivalent of Comparable in Obj-C yourself too.
or
define in Java a
setValue(String, float) wrapper and do the conversion to
setValue(Comparable,Number) there.
Pascal Pochet
email@hidden
On 13 fivr. 2004, at 00:25, Rimas Mickevicius wrote:
Hi there,
I need to use some Java classes. As manual, I've read the article
http://cocoadevcentral.com/articles/000024.php . Everything looks
great, but.. I have a problem with Java methods, which needs more than
1 argument. For example there is a method:
public void setValue(Comparable key, Number value) {
this.data.setValue(key, value);
fireDatasetChanged();
}
I'm trying to call it in this way: [data setValue:@"FirstPart" :43.2];
This way is described in the CocoaDevCentral article. But when I'm
trying to run my program it crashes:
*** -[org/jfree/data/DefaultPieDataset setValue::]: selector not
recognized
2004-02-13 00:45:58.278 01Chart_suJava[744] *** Uncaught exception:
<NSInvalidArgumentException> *** -[org/jfree/data/DefaultPieDataset
setValue::]: selector not recognized
01Chart_suJava has exited due to signal 5 (SIGTRAP).
Can anybody help me? Any suggestions are welcome.
Thanks
_______________________________________________
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.
_______________________________________________
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.