iTools System object bug ?? [message #47821] |
Mon, 06 March 2006 02:41  |
Antonio Santiago
Messages: 201 Registered: February 2004
|
Senior Member |
|
|
Hi group,
this is a happy iTools question. I know major part of you are fans of
iTools and I hope you can help me. (Sorry, this is a little joke, I dont
want to cause the wrath of gods against me).
Well, the question is in iTools is supossed that IDLitSystem object is a
singleton (implemented as common code). Only exist one object System and
can exists manu "tools" objects.
Take a look at the following code (I think it is right :) ).
****
Before execute, put a line in your "IDLitSystem::Init" object (something
like "PRINT, 'Initialized System'".
****
The code creates an "Image Tool" (IDLitToolImage), then creates a
IDitData object and stores it in the component hieriarchy.
The problem is that if you use the "AddByIdentifier" with a fully
qualified identifier then two System object will be created !!!
PRO test2
idTool = IDLitSys_CreateTool('Image Tool')
idt = ITGetCurrent(TOOL=oTool)
da = OBJ_NEW('IDLitData', NAME='data_a')
a = bindgen(10,10)
r = da->SetData(a)
oTool->AddByIdentifier, 'Layers', da
;; Uncomment this and two IDLitSystem object will be created. Is
;; this right???
; oTool->AddByIdentifier, '/Layers', da
END
Any sugestions or ideas??
Is correct that exists two different System object? I think not, but
also the above code can be wrong.
Thanks.
--
-----------------------------------------------------
Antonio Santiago P�rez
( email: santiago<<at>>grahi.upc.edu )
( www: http://www.grahi.upc.edu/santiago )
( www: http://asantiago.blogsite.org )
-----------------------------------------------------
GRAHI - Grup de Recerca Aplicada en Hidrometeorologia
Universitat Polit�cnica de Catalunya
-----------------------------------------------------
|
|
|