I am getting close to having my Java application act a a Service
provider. However, whenever I try to access the data passed to me,
my process dies with a Bus Error.
Here is my method that is called when the service is chosen:
public void indexText(NSPasteboard pBoard, NSStringReference
strRef)
{
System.out.println(strRef.length());
System.out.println("indexText");
}
If I comment or the first line of the method, it successfully prints
"indexText", so I know the system is finding my method correctly.
However, if I try to do anything with strRef, like finding its length
or calling string(), I get a Bus Error.
I haven't found any examples in Java of how to declare this method,
so I'm just guessing I've got it right. Here is how one is declared
in Obj-C
- (void)indexText:(NSPasteboard *)pboard
userData:(NSString *)userData
error:(NSString **)error
{
.....
}
NSString doesn't exist in the Java bridge so I assume you are
supposed to us NSStringReference instead. It is not clear what I'm
supposed to do about error NSString**. Just declaring the method
void seems to work in so far as the method is found and called.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden