Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Treeview and private datasession
Message
De
25/11/2003 10:11:20
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
25/11/2003 09:15:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00853186
Message ID:
00853285
Vues:
21
This message has been marked as the solution to the initial question of the thread.
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
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform