Re: resetting structs [message #12233] |
Tue, 28 July 1998 00:00 |
don shad
Messages: 7 Registered: July 1998
|
Junior Member |
|
|
Vap User <vapuser@haifung.jpl.nasa.gov> wrote:
> 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.
i will defiantely have to look into the emacs mode. i am a big
fan of emacs as a development environment w/ C/C++. couldn't live
without it. it's good to hear that it works w/ IDL.
> You have to change your class definitions so much that getting in and
> out of the DE is an issue?
not only do i have trouble making up my mind in general, but i am
in the early and painful stages of learning IDL, and I want to
experiment w/ various things. I spent a lot of time cursing RSI,
myself and people around my office, until i relized that quitting
and starting IDL again often does wonder for the bugs in ones
code. not really a good solution, though.
so, a plea to RSI: create an executive directive: .RESETDE or
.TRYAGAIN or something to clean the cobwebs out of the DE.
thanks for the help.
don
>>
>> 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>
--
-------------------------------------------------------
Brought to you sloooooooowly by Frontier Communications,
the Intermittent Service Provider.
|
|
|
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>
|
|
|
Re: resetting structs [message #12246 is a reply to message #12242] |
Mon, 27 July 1998 00:00  |
R. Bauer
Messages: 137 Registered: November 1996
|
Senior Member |
|
|
don shad wrote:
> 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
For a moment I thought temporary(struct) will do the job, but unfortunately idl remembers
the previous syntax of struct.
Where did it store these information?
If it's done in a common block I'd like to know where it is?
--
R.Bauer
Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
|
|
|
Re: resetting structs [message #12250 is a reply to message #12242] |
Fri, 24 July 1998 00:00  |
Vap User
Messages: 31 Registered: April 1998
|
Member |
|
|
don shad <dschad@frontiernet.net> writes:
You can't redefine a named structure within one session of IDL. Once
you define it, it's fixed for that session. You must exit IDL (or
IDLDE in your case), start up another session, then redefine. You see
the error when you attempt to actually execute the code contained in
the junk__define.pro or try to execute it's equivalent at the command
line. There is no compilation error because it is not an error to
compile a module that defines a structure different from the one you
currently have defined, only to execute that module. Since you seem to
be working with Objects, which require a named structure, you're out
of luck.
The rule of thumb is, avoid named structures unless you really need
them. Working with Objects is a case of the latter.
whd
>
> hi,
>
> (it has been a long road just getting a message to
> post to the news group).
>
> 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.
>
> i have been unable to find any help from either the FAW
> or the documentation on this problem (^R doesn't do it
> either).
>
> any help would be much appreciated.
>
> thanks very much,
>
> don schad
> hydroqual.com
> -------------------------------------------------------
> 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>
|
|
|
Re: resetting structs [message #12258 is a reply to message #12250] |
Fri, 24 July 1998 00:00  |
don shad
Messages: 7 Registered: July 1998
|
Junior Member |
|
|
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.
|
|
|
Re: resetting structs [message #12260 is a reply to message #12250] |
Thu, 23 July 1998 00:00  |
Phillip & Suzanne[1]
Messages: 1 Registered: July 1998
|
Junior Member |
|
|
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.
|
|
|