Re: resetting structs [message #12242 is a reply to message #12233] |
Mon, 27 July 1998 00:00   |
Vap User
Messages: 31 Registered: April 1998
|
Member |
|
|
don shad <dschad@frontiernet.net> writes:
As far as I know, IDL has never allowed one to change named structures
within a session of IDL. It used to be the case, (before IDL 3.6?)
these were the ONLY type of structure there were, at least we have
anonymous structure now. This was true before objects made their way
into IDL. I think you're out of luck here. Since the DE is just a GUI
on top of the interpreter, and this is an interpreter limitation, you
won't be able to make the DE 'forget' your classes and be able to
reset them, so the answer is 'yes', you have exit, then reenter the
DE. Named structure are one of those things, like the number of colors
you're using, that, once set, remain constant for a session. I agree,
this does reduce the usefulness of the DE. You might consider the IDL
mode in an emacs buffer, if you have emacs. Of course this requires
learning emacs, a non-trivial task, but well worth it in my mind. This
is what I do for almost all of my development work. I would be doing
all of it this way, but IDL changed the way it reported stoppages by
putting a break in the line giving the line number and the emacs mode
has trouble parsing that line, so sometimes I have to use the DE.
You have to change your class definitions so much that getting in and
out of the DE is an issue?
>
> Thanks for you reply. Unfortunately it is not what I was hoping
> to hear.
>
> If a structure cannot be redeclared, does this mean that I have
> to leave the IDLDE every time I want to make a change to any of
> my classes? In my mind, that seriously reduces the usability of
> the development environment. Is it possible to reset the DE
> and have it forget my classes?
>
>
>
> thanks again,
>
> don
>
>
> Phillip & Suzanne David <pdavid.nospam@earthling.net> wrote:
>> Don;
>
>
>> Once a NAMED structure has been defined, it cannot be redeclared differently.
>> Thus, you would have to create an anonymous structure. If you are trying to
>> do this in an object, that won't work. The values of the data can change from
>> one instance of the structure to another, but the names and types of variables
>> in the structure can't. At the IDL command line, try the following:
>
>> struct = {data:0}
>> struct = {mydata:0}
>
>> This will neither cause errors nor get ignored, but your structure will be anonymous.
>
>> Phillip David
>
>>> how does one re-declare a struct in the IDLDE? if i
>>> create
>
>>> struct = {junk, data:0}
>
>>> but later decide that i want to do
>
>>> struct = { junk, mydata:0 }
>
>>> i either get an error (if in the ide commandline), or
>>> if i do this in a "junk__define.pro" and use a ".compile
>>> junk__define.pro", i get no change in my structure.
>>> this has caused no end of pain for me.
>
> --
> -------------------------------------------------------
> Brought to you sloooooooowly by Frontier Communications,
> the Intermittent Service Provider.
--
I don't speak for JPL, it doesn't speak for me.
Well, not all the time, at least.
William Daffer <vapuser@haifung.jpl.nasa.gov>
|
|
|