Subclassing from IDLitTool ?? [message #40708] |
Wed, 01 September 2004 06:24  |
Antonio Santiago
Messages: 201 Registered: February 2004
|
Senior Member |
|
|
Hi,
i'm starting with iTools and i try this example:
************************************************************ ************
************************************************************ ************
FILE: iprobe__define.pro
;Init method
FUNCTION iprobe::Init
IF ( self -> IDLitToolbase::Init(_EXTRA = _extra) EQ 0) THEN $
RETURN, 0
RETURN, 1
END
;Define object struct
PRO iprobe__Define
struct = { iprobe, $
INHERITS IDLitToolbase $ ; Provides iTool interface
}
END
;---------------------------------
************************************************************ ************
************************************************************ ************
FILE: iprobe.pro
PRO iprobe
ITREGISTER, "Example iTool", "iprobe"
identifier = IDLITSYS_CREATETOOL("Example iTool")
END
all is fine. A new iTool component is created (empty but ok) with all
standard functionality.
The "iTool Developer's Guide" say that if i want an iTool without
standar functionality i need to subclassing from IDLitTool. I try it
replacing "IDLitToolbase" to "IDLitTool" in file iprobe__define.pro.
The result is an error (in a dialog window) like:
"A system error was... bla, bla, bla"
"The value of this error was:"
"Object reference type required in this context"
What do i need to do to subclassing from IDLitTool?
Thanks.
|
|
|
Re: Subclassing from IDLitTool ?? [message #40842 is a reply to message #40708] |
Wed, 01 September 2004 19:37  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Christopher Lee writes:
> I put the following code in a fresh file, compile the file, and then run the
> IPROBE procedure, it works first time. You can even take out the 'file'
> menu item. It still works for me. I'm not sure it's a bug, but you need
> at least one manipulator/tool to start the iTool.
Humm. I take your code. Start up a completely fresh
IDL session (IDL 6.1, Windows). Run your code, and
get the same "Unknown system error" message.
>
> If that doesn't work, but the IDLitToolbase version works. Have a look
> at the IDLitToolbase source. Strip the menus out of there until your left
> with the minimum that will compile :)
Yeah, when I have a couple of extra days. :-)
> As you said, this isn't possible with the information given in the
> documentation.
I've heard of people outside of RSI who *are*
writing iTool programs, but they seem to be creating
their own help files and documentation as they go.
Maybe they will share it with RSI when they are
finished. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|