• 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
cocoa java bridge: converting nsarray to java array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cocoa java bridge: converting nsarray to java array


  • Subject: cocoa java bridge: converting nsarray to java array
  • From: Matthew <email@hidden>
  • Date: Sat, 20 Nov 2004 17:13:15 -0500

Hello,

I have an issue using the Cocoa Java Bridge. It is working fine for calling Java methods that require no arguments or string arguments, but I'm having an issue passing an NSArray of NSString to a java method that expects an array of java strings objects.

A method exists in a Java class that wants an array of strings like this:

public void someMethod( String[] whatever) {//body}

From Objective C my header for this Java method is the following:

- (void)someMethod(NSArray*)whatever;

The NSArray of course is loaded with a few NSStrings. At runtime I get this nice error:

*** Uncaught exception: <NSInvalidArgumentException> _BRIDGEMorphObjcArgumentsForJava: can't convert argument to Java array


So the question would be, what's going on here? Is it not possible to pass an NSArray in this way? Any ideas?


Matthew



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: cocoa java bridge: converting nsarray to java array
      • From: "M. Uli Kusterer" <email@hidden>
    • Re: cocoa java bridge: converting nsarray to java array
      • From: Marcel Weiher <email@hidden>
  • Prev by Date: Can one rid of a control's border?
  • Next by Date: Using mouseEntered and mouseExited
  • Previous by thread: Can one rid of a control's border?
  • Next by thread: Re: cocoa java bridge: converting nsarray to java array
  • Index(es):
    • Date
    • Thread