Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > AppleScript Studio & Java

AppleScript Studio & Java
Thread Tools
Junior Member
Join Date: Apr 2001
Location: Petersfield, UK
Status: Offline
Reply With Quote
Apr 4, 2002, 11:31 AM
 
I'm sorry if this is a straightforward question but I have looked all over for an answer and can't find one.

How do you call a Java method from AppleScript Studio when the method takes parameters?

I have read that methods need to be static and can get:
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
public static getInfo() {
<font color = brown>// code here</font>
}
</font>[/code]
to work with:

<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>set variable to call method <font color = red>"getInfo"</font> of class &lt;className&gt;</font>[/code]

but if I add a parameter as so:

<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>public static getInfo(String input) {</font>[/code]

and call:

<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>set variable to call method <font color = red>"getInfo"</font> of class &lt;className&gt; with parameter <font color = red>"some information"</font></font>[/code]

then nothing happens. I am assuming it is something to do with the format of the parameter but I am not sure. I don't know how to wrap everything in Objective-C so unless the code is VERY easy to copy that is not an option.

Thanks for your help, James
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:32 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2