Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Treeview and private datasession
Message
From
25/11/2003 10:49:10
 
 
To
25/11/2003 10:11:20
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00853186
Message ID:
00853305
Views:
18
Hi Agnes,

I have followed your advice and starting from scratch, increased the steps between entering the form and exiting the form, afterwards looking at the datasessions

You'll never believe it, but my method NodeExists is the reason

I have modified the code a bit so that I do not need that method any more.

I'll try to find another way to test for the existence of a node in the future

Thank you so much

Gregory
_____________________________

>Hi Gregory,
>see my comments below
>
>>... and it's all very simple stuff
>
>anything with treeview looks simple only
>>
>>The form closes normally, it's just the datasession that is left.
>
>It is forms datasession?
>
>>I do not iterate through the nodes. I just populate the tv with the root nodes and expand them if needed
>
>Playing around with ".node = ..." could be enough (Iterating is just an example)
>
>>I even have even removed the nodes when I got Collapse() event. To no avail.
>
>I can rember this as well, it was not of help to clean the treeview.
>
>>There surely is a way to avoid the leftover dataasessions. The challenge is to find it. But after two days of struggling, I thought I'd ask ;-)
>
>You work hard until you ask. Since I'm in UT, I skip testing much faster. ::) One will go lazy on that.
>
>
>What else can I tell you?
>All my ideas are now try and error.
>
>Try closing your form as soon as posible.
>That means
>Connect treeview with viewlist load no node, close form and see whats happen.
>Do the same after adding the first node(s).
>
>There must be a point where behaviour is changing.
>
>Your example seems very straight and there is no problem I can see so far.
>
>3 things I would suggest:
>Do not use NODE as var(parameter) name, use something like toNode instead. This will avoid collisions with reserved words. (Same thing to LockScreen) I.O.W. avoid anything that is colored as reserved word as non reserved word.
>
>Follow the rule "Event Calls Method", what mean do not place much code in an event. The Event should call a custom method. All code in event should be (if possible) Method Call; RETURN, DODEFAULT, NODEFAULT if needed.
>
>You use a cursor to create your Node from. Why not store the "NodeExists" in that cursor? It will speed up the scan, you do not need those On Error stuff. As soon as you use Object's ERROR method, ON ERROR will fail. (Or (my favourite) switch to VFP 8.0, TRY CATCH is fine and the step is not that far)
>
>Agnes
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform