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

Home » Public Forums » archive » Re: JAVA Bridge Problem
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: JAVA Bridge Problem [message #66019] Mon, 06 April 2009 18:26
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> I am going to make another plea for information or help. We are
> writing a large JAVA program to serve up data. We are hoping
> to use IDL objects to produce "analysis plots" of the data.
> We have had absolutely NO luck getting the IDLEXBR_Assistant,
> which is used to write the JAVA wrapper program that can
> access the IDL object to work.

Oh, dear. This article should have been entitled "JAVA
Bridge Problem: A Cautionary Tale".

Thanks to Jim Pendleton at ITTVIS, who gave me some
fresh ideas which enabled me to track this problem down.
I'm almost embarrassed to tell you what it was. For nearly
twenty years I've preached the mantra of IDL file
naming conventions: Put the "command" module last
in the file, give the file the name of the command
module, and if you have other modules in the file, they
should ONLY be utility routines for the command module.
Do something else, and you will surely invite a world
of frustration and pain.

I should attend one of my own classes one of these days.

Anyway, about a year ago I wrote PS_START and PS_END,
which were easy ways to set up your PostScript output,
get nice looking PNG files for seminar presentations,
and the like. Very nice programs (especially with recent
changes) and I use them often.

But, as it happened, I thought, well, there is no point
calling PS_END unless you first called PS_START, so what's
the harm in putting them in the same file, with PS_END ahead
of PS_START in the file? When you call PS_START, PS_END will
by necessity get compiled, so all will work as expected and
this will be a convenience for the user.

I can't tell you how many hours I've spent tracking this
problem down, but "convenience" is not a word I've been
familiar with lately.

Anyway, as near as I can tell, the IDLExBr_Assistant has
a different way of compiling IDL code than the rest of IDL,
because this turned out to be a compilation order problem.
At least I think it is. The error handling in the Bridge
Assistant is, uh, not very helpful, so I can't tell you
exactly what the problem was, only how I fixed it.

The solution, in my case, was to create separate files
for PS_END and for a structure definition that I used
in both PS_START and PS_END. Once I did that, the Bridge
Assistant had no trouble opening the object file.

I'll be updating my files later tonight, and *finally*
moving on to some more pleasant tasks. Maybe I'll even
take that book, IDL Programming Techniques, to bed with
me tonight. I hear it has some good IDL programming tips. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: JAVA Bridge Problem
Next Topic: circles on the sky

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

Current Time: Wed Oct 08 19:34:56 PDT 2025

Total time taken to generate the page: 0.00506 seconds