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

Home » Public Forums » archive » Re: Calling IDL Objects from 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: Calling IDL Objects from JAVA [message #65131] Fri, 13 February 2009 10:39
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
sdettrick@gmail.com writes:

> I also like to use propertysheet and IDLitComponent, via a base class
> that all of my objects inherit - even my direct graphics are wrapped
> in IDLitComponent objects now. It is such a powerful technique I
> always wonder why RSI/ITT didn't just finish the job themselves and
> make everything pop up a property sheet on middle click? They could
> have developed iTools in half the time, and the result would have the
> advantage that it would be comprehensible!

I've just always assumed that the point of iTools is that
they are NOT comprehensible. It makes it possible to grow
your consulting business in the face of slumping software
sales. :-)

Cheers,

David

--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Calling IDL Objects from JAVA [message #65133 is a reply to message #65131] Fri, 13 February 2009 09:55 Go to previous message
sdettrick@gmail.com is currently offline  sdettrick@gmail.com
Messages: 5
Registered: February 2007
Junior Member
On Feb 13, 9:21 am, David Fanning <n...@dfanning.com> wrote:
> sdettr...@gmail.com writes:
>> What about making your objects inherit IDLitComponent?  Then you could
>> use SetPropertyByIdentifier instead of SetProperty.
>
>> I do not use Java at all, but I find IDLitComponent to be one of the
>> most useful classes in IDL.
>
> Well, now, *there* is a good idea! All of these objects
> are already subclassed IDLitComponent objects, since I
> I normally use the IDL propertysheet widgets to get and
> set properties. I hadn't thought of using the
> SetPropertyByIndentifier method. Thanks!

I am happy to be of use as you have helped me a lot over the years!
Actually I thought your anonymous struct idea sounded like a good
shortcut, as I suppose you could just make a one line Set method:

pro myobj::Set, my_struct
self->SetProperty, _EXTRA=my_struct
end

Would save a heck of a lot of SetPropertyByIdentifiers.

I also like to use propertysheet and IDLitComponent, via a base class
that all of my objects inherit - even my direct graphics are wrapped
in IDLitComponent objects now. It is such a powerful technique I
always wonder why RSI/ITT didn't just finish the job themselves and
make everything pop up a property sheet on middle click? They could
have developed iTools in half the time, and the result would have the
advantage that it would be comprehensible!

All the best,
Sean

>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Calling IDL Objects from JAVA [message #65135 is a reply to message #65133] Fri, 13 February 2009 09:21 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
sdettrick@gmail.com writes:

> What about making your objects inherit IDLitComponent? Then you could
> use SetPropertyByIdentifier instead of SetProperty.
>
> I do not use Java at all, but I find IDLitComponent to be one of the
> most useful classes in IDL.

Well, now, *there* is a good idea! All of these objects
are already subclassed IDLitComponent objects, since I
I normally use the IDL propertysheet widgets to get and
set properties. I hadn't thought of using the
SetPropertyByIndentifier method. Thanks!

Cheers,

David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Calling IDL Objects from JAVA [message #65137 is a reply to message #65135] Fri, 13 February 2009 06:52 Go to previous message
sdettrick@gmail.com is currently offline  sdettrick@gmail.com
Messages: 5
Registered: February 2007
Junior Member
On Feb 12, 2:49 pm, David Fanning <n...@dfanning.com> wrote:
> Folks,
>
> We are working on a new web portal that uses JAVA code
> for most of its operations. We wish to add some graphical
> functionality to the web page, so we are using the
> JAVA bridge to call some already defined IDL objects
> that open a file, process the data, create a PNG file,
> and display it on the web page.
>
> All of this works reasonably well. (We have had
> some weird problems with the IDL JAVA Bridge
> Assistant Wizard, or whatever it is calling itself
> these days, but for the moment we have overcome these.)
>
> Our main problem is that our IDL objects use a LOT
> of keywords in their methods. Specifically, in their
> SetProperty methods. We do this primarily for ease of
> communicating with superclass objects, and it seems to
> be a "best practice" to judge from most of the objects
> written from within the ITTVIS confines.
>
> As it happens, JAVA doesn't know anything at all
> about keywords, and indeed the IDL JAVA Bridge
> programmers who wrote the JAVA wrappers admit that
> you can't pass keywords to IDL object methods from
> JAVA. Bummer, to say the least. :-(
>
> So much a bummer that you wonder why anyone would bother
> to write a JAVA IDL Bridge in the first place.
>
> But that aside, perhaps someone has some ideas on how to
> proceed. We have kicked around several ideas, none terribly
> compelling, that would have the advantage of us not having
> to write duplicate methods for all of our important methods
> that we wanted to expose to the JAVA programmer.
>
> We have settled, we think, on JAVA passing a "keyword string"
> of keyword:value pairs, that we would parse to create an
> anonymous structure of keywords and their values. As long
> as our keyword values are fairly "generic" (strings, integers,
> and floats), this is not a huge deal. We take this keyword
> structure and pass it to the appropriate object method, which
> is also named in the same string. (We use CALL_METHOD for the
> latter.)
>
> Has anyone run into this problem before? (I can't imagine
> you haven't!) What have you done to solve it?
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")


What about making your objects inherit IDLitComponent? Then you could
use SetPropertyByIdentifier instead of SetProperty.

I do not use Java at all, but I find IDLitComponent to be one of the
most useful classes in IDL.

Cheers,
Sean
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: What are the memory limitations of 64-bit IDL?
Next Topic: Re: What are the memory limitations of 64-bit IDL?

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

Current Time: Wed Oct 08 16:00:51 PDT 2025

Total time taken to generate the page: 0.00443 seconds