MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: JLink

  • To: mathgroup at smc.vnet.net
  • Subject: [mg41218] Re: [mg41209] JLink
  • From: Todd Gayley <tgayley at wolfram.com>
  • Date: Thu, 8 May 2003 09:32:04 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

At 02:57 AM 5/7/03, solex wrote:
>Hello,
>Is there any reference on the web for JLink.  I posted a question last week
>and did not get a response?
>Thanks,
>Dan


Dan,

Sorry, I didn't notice your first query. The original question:


>We have written a small Java Interface that retrieves values from a
>user.  The Java Interface is written entirely in java and is called
>inside of Mathematica.  Mathematica listens to the "OK" button event, in
>doing so it sets up some internal variables from the java interface and
>then runs the mathematica solution.
>
>
>If the user decides to run the solution again by selecting different
>values from the Java interface and then presses the OK button we are
>noticing that Mathematica is making the internal variables multivalued
>and keeps the orginal values.  Why are the variables now multivalued or
>am I missing something?


As others have noted, to really understand the problem we would need to see 
some code. But I can guess from what you have said that the problem doesn't 
actually have much to do with J/Link, and therefore looking in the J/Link 
documentation won't be of any help. Instead, look at the Mathematica code 
inside your handler for the OK button. Mathematica isn't "making the 
internal values multivalued"--you are, and probably in the OK button 
handler. Perhaps you are appending to a list each time the Java interface 
is run?


Todd Gayley
Wolfram Research



  • Prev by Date: Re: Re: How change $AddOnsDirectory
  • Next by Date: why is it?
  • Previous by thread: Re: JLink
  • Next by thread: How save animation