Page 1 of 1

TreeTree store abd reload (file and Stream)

Posted: Wed Nov 17, 2004 1:22 pm
by 7725189
Hello,

Q1) STORE AND LOAD ON FILE

if y use this code > the store on file is OK with file create file but reload is no possible ??

Tree1.NoOwnerShapes:=False;
SaveTreeToFile(Tree1,'c:\tmp2.ttr');
Tree1.Clear;
LoadTreeFromFile(TCustomTree(Tree1),'c:\tmp2.ttr'); //<< plantage

Q2 ) STRORE AND LOAD ON STREAM

Who take for Store And Reload Tree in Stream, witout tempory file ??

Posted: Wed Nov 17, 2004 9:18 pm
by Tom
Q1) This should be working. When do you set Tree1.NoOwnerShapes to false? in the OnCreate event of the form? or just when saving the tree?

Q2) Sorry, I don't understand your question. Do you want to know how to use the LoadTreeFromStream and SaveTreeToStream functions? Or weren't you aware of these functions?

Posted: Fri Nov 19, 2004 7:46 am
by 7725189
Sorry for past time

I still problème , if i execute this code>> no execption but infinite blocking !!
try
LoadTreeFromFile(TCustomTree(Tree1),'c:\tmp2.ttr');
except
on E:exception do S:=E.message;
end;

I found in Teetree.pas where the Problème on function
TeeTreeFindGlobalComponent(const Name: string): TComponent;

the code Loop to infinite ?? why
if i stop with break point >>name = '_2978422' , etc, etc

Posted: Mon Nov 22, 2004 3:40 pm
by Tom
Can you send me your source code in which you receive this problem?

Thanks,
tom@steema.com

Posted: Thu Sep 07, 2006 5:58 pm
by 9336271
I am experiencing the same problem. Application freezes because of looping in procedure TeeTreeFindGlobalComponent.

Any help would be appreciated.

Thanks
T.S.

Posted: Thu Sep 07, 2006 6:27 pm
by Tom
First, please note that circular references are not possible in teeTree.

If you do not have circular references, please provide me a souce-code example which can mimic this wrong behavior

Posted: Thu Sep 07, 2006 9:10 pm
by 9336271
The issue arose from the fact that there was a form with name = '' currently created in the app. I removed the form, and the problem went away.

Posted: Thu Sep 21, 2006 7:36 pm
by Tom
thanks for letting us know