TreeTree store abd reload (file and Stream)

TeeTree VCL for Borland Delphi and C++ Builder.
Post Reply
MD
Newbie
Newbie
Posts: 2
Joined: Fri Nov 15, 2002 12:00 am
Location: FRANCE

TreeTree store abd reload (file and Stream)

Post by MD » Wed Nov 17, 2004 1:22 pm

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 ??

tom
Advanced
Posts: 211
Joined: Mon Dec 01, 2003 5:00 am
Contact:

Post by tom » Wed Nov 17, 2004 9:18 pm

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?

MD
Newbie
Newbie
Posts: 2
Joined: Fri Nov 15, 2002 12:00 am
Location: FRANCE

Post by MD » Fri Nov 19, 2004 7:46 am

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

tom
Advanced
Posts: 211
Joined: Mon Dec 01, 2003 5:00 am
Contact:

Post by tom » Mon Nov 22, 2004 3:40 pm

Can you send me your source code in which you receive this problem?

Thanks,
tom@steema.com

MetegrityInc
Newbie
Newbie
Posts: 4
Joined: Wed Mar 10, 2004 5:00 am
Location: Edmonton
Contact:

Post by MetegrityInc » Thu Sep 07, 2006 5:58 pm

I am experiencing the same problem. Application freezes because of looping in procedure TeeTreeFindGlobalComponent.

Any help would be appreciated.

Thanks
T.S.

tom
Advanced
Posts: 211
Joined: Mon Dec 01, 2003 5:00 am
Contact:

Post by tom » Thu Sep 07, 2006 6:27 pm

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

MetegrityInc
Newbie
Newbie
Posts: 4
Joined: Wed Mar 10, 2004 5:00 am
Location: Edmonton
Contact:

Post by MetegrityInc » Thu Sep 07, 2006 9:10 pm

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.

tom
Advanced
Posts: 211
Joined: Mon Dec 01, 2003 5:00 am
Contact:

Post by tom » Thu Sep 21, 2006 7:36 pm

thanks for letting us know

Post Reply