comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: passing parameter from IDL to Java
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: passing parameter from IDL to Java [message #65491] Fri, 06 March 2009 08:37
None[1] is currently offline  None[1]
Messages: 13
Registered: August 2007
Junior Member
On Mar 5, 4:52 pm, mgalloy <mgal...@gmail.com> wrote:
> Raj wrote:
>> Hi,
>> I am new to IDL-Java Bridge. I was wondering whether there is a way to
>> set the variables in Java from IDL. For example., setNum(number) from
>> an IDL program to a Java program which implements the function setNum
>> ().
>
>> Something like below....
>
>> NumGetset.java
>
>> public class NumGetset {
>>    public int num1,num2;
>>    public void setNum(int num1, int num2)
>>    {
>>            this.num1 = num1;
>>            this.num2 = num2;
>>    }
>>    public int getNum1()
>>    {
>>            return this.num1;
>>    }
>>    public int getNum2()
>>    {
>>            return this.num2;
>>    }
>
>> }
>
>> pro NumGetsetDemo
>
>> jo = OBJ_NEW('IDLJavaObject$NUMGETSET', 'NumGetset')
>
>> ;How to set the variables here? Is it possible to do that?
>> ;setNum(100,200)
>
>> print, 'Num1 = ', jo -> getNum1()
>> print, 'Num2 = ', jo -> getNum2()
>> OBJ_DESTROY, jo
>
>> end
>
> You should be able to do:
>
>    jo->setNum, 100, 200
>
> Mike
> --www.michaelgalloy.com
> Associate Research Scientist
> Tech-X Corporation

Thanks a lot!!

Regards,
Rajesh
Re: passing parameter from IDL to Java [message #65499 is a reply to message #65491] Thu, 05 March 2009 13:52 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
Raj wrote:
> Hi,
> I am new to IDL-Java Bridge. I was wondering whether there is a way to
> set the variables in Java from IDL. For example., setNum(number) from
> an IDL program to a Java program which implements the function setNum
> ().
>
> Something like below....
>
> NumGetset.java
>
> public class NumGetset {
> public int num1,num2;
> public void setNum(int num1, int num2)
> {
> this.num1 = num1;
> this.num2 = num2;
> }
> public int getNum1()
> {
> return this.num1;
> }
> public int getNum2()
> {
> return this.num2;
> }
>
> }
>
> pro NumGetsetDemo
>
> jo = OBJ_NEW('IDLJavaObject$NUMGETSET', 'NumGetset')
>
> ;How to set the variables here? Is it possible to do that?
> ;setNum(100,200)
>
> print, 'Num1 = ', jo -> getNum1()
> print, 'Num2 = ', jo -> getNum2()
> OBJ_DESTROY, jo
>
> end

You should be able to do:

jo->setNum, 100, 200

Mike
--
www.michaelgalloy.com
Associate Research Scientist
Tech-X Corporation
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: country outlines
Next Topic: R for Astronomers

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:22:29 PDT 2025

Total time taken to generate the page: 0.00416 seconds