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

Home » Public Forums » archive » iTools System object bug ??
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
iTools System object bug ?? [message #47821] Mon, 06 March 2006 02:41 Go to next message
Antonio Santiago is currently offline  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
-----------------------------------------------------
Re: iTools System object bug ?? [message #47870 is a reply to message #47821] Wed, 08 March 2006 09:47 Go to previous message
codepod is currently offline  codepod
Messages: 19
Registered: March 2006
Junior Member
Antonio,

You are correct, this is a bug. There should only ever be 1 system
object.

This issue is in _IDLitComponent::AddByIdentifier and it's ability to
dynamically create new folders in the iTools hierarchy.

To get around this you could manually walk the iTools hierarchy, find
your target location for your data object and add it.

I passed this on to someone I know at RSI and it will be filed as a
defect.

Cheers


Antonio Santiago wrote:
> 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
> -----------------------------------------------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: socket telnet issues
Next Topic: Name Space Conflicts

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

Current Time: Wed Oct 08 15:16:35 PDT 2025

Total time taken to generate the page: 0.00563 seconds