Error in writing IDL file
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, July 17, 2001 08:20 PM

I write an IDL file like this module complex { interface Complex { void init(in double real, in double img); void add(in Complex c); double get_real(); double get_img(); }; }; when I use idl2java, I got an error at line void add(in Complex c); . It's because I use Complex there. But there's no problem if I write an Java interface like this public interface Complex { void init(double real, double img); void add(Complex c); // add c to the current complex double get_real(); double get_img(); } How can I overcome this problem? Would you email me at dang_vu@yahoo.com? Thanks.    More>>

I write an IDL file like this


module complex {
interface Complex {
void init(in double real, in double img);
void add(in Complex c);
double get_real();
double get_img();
};
};


when I use idl2java, I got an error at line void add(in Complex c); . It's because I use Complex there. But there's no problem if I write an Java interface like this


public interface Complex {
void init(double real, double img);
void add(Complex c); // add c to the current complex
double get_real();
double get_img();
}


How can I overcome this problem?
Would you email me at dang_vu@yahoo.com? Thanks.

   <<Less

Re: Error in writing IDL file

Posted By:   Dermot_Hennessy  
Posted On:   Wednesday, July 18, 2001 03:30 AM

Please, please follow the posting guidelines when posting code and nest it in pre tags.



Nag over with, I'll address your question. I am using the version of Visibroker supplied with JBuilder 3.0 and do not see the problem being experienced by you, i.e. your idl generates without a problem.



This leads me to believe that you are perhaps using an older version with a bug in the idl compiler?



You might try to forward declare the Complex interface as follows:


module complex
{
interface Complex;

interface Complex
{
void init(in double real, in double img);
void add(in Complex c);
double get_real();
double get_img();
};
};


Let me know if this works.

Dermot
About | Sitemap | Contact