Welcome! Log In Create A New Profile

Advanced

How to store a changed treeview???????

Posted by devi.pcs.crosspost 
devi.pcs.crosspost
How to store a changed treeview???????
September 19, 2008 06:04PM
before closing a window containing a treeview, i need to store the information of the treeview. The content of the tree has been changed via drag/drop by the user.
(given node becomes a other hirachicle Node and so on)
After Re-opening the window witch includes the treeview, the last information of the treeview must be displayed as before closing. How do do so?????? Any ideas???
Seems WINDEV doesn´t know this case!!!

thanks for your help

Message forwarded from pcsoft.us.windev
BLS.pcs.crosspost
Re: save tree information of a treeview
September 19, 2008 06:19PM
devi schrieb:
> Is there a command like "SAVETREE". Is there a way to do this symply?????
>
>

No sorry no SAVETREE command. You have to implement it by yourself/
Means iterating over the tree ( which is a recursive process)
Something like :
PROCEDURE IterateTree(theTree, node is string = "")
....
IF isNode() THEN
SaveNode()
IterateTree(theTree, thecurrentNode)
ELSE // Leaf
SaveLeaf()
END



Being tiered, so just a quick hack
Bjoern
Message forwarded from pcsoft.us.windev
Fabrice Harari.pcs.crosspost
Re: save tree information of a treeview
September 22, 2008 04:57PM
Nice catch... you should send it to pcsoft and tell them that
recursivity is not supported :-)

The good thing is that I don't use the groupware, I have my own set of
classes for this kind of things, and I don't use recursivity :-)

Fabrice

BLS wrote:
> Hi Fabrice
>
> Code is part of : User GroupWare / GPWDetailConfiguration;
>
> PROCEDURE RemplirTous(sParent)
>
> // Premier champ de la fenêtre
> sNomChamp est une chaîne=EnumèreSousElément(sParent,enumPremier)
> TANTQUE sNomChamp<>""
>
> // nom complet du champ
> sNomComplet est une chaîne=sParent+"."+sNomChamp
> // récupération du type de l'élément
> nType est un entier={sNomComplet,indGPW}..Type
>
> // si c'est un groupe de champs ou un onglet
> SI nType=typOnglet OU nType=typTable OU nType=typBarreOutils OU
> nType=typBoîteAOutils OU nType=TypFenetreInterneSource ALORS
>
>
> // énumération des champs qui sont à l'interieur
> RemplirTous(sNomComplet) // LOOK MA, I AM A RECURSIVE!!
> ========================================================
> .............
>
>
> Kind regards, Bjoern
>
> Fabrice Harari schrieb:
>> Hi Bjoern
>
>> Actually, it wont... It's stacked CALLS (ie window open, procedure
>> calss, etc)
>>
>> Controls are not in that stack at all
>>
>> Best regards
>>
>> Fabrice
>>
>>
>>
>>> Erm ... I think "old school" Pascal/Modula have nearly the same limits.
>>> Kind regards, Bjoern
>>>
>>>
>>>> BLS wrote:
>>>>> Fabrice Harari schrieb:
>>>>>> Hi Everybody...
>>>>>>
>>>>>> Just my 2 cents... Recursivity is NOT supported in WLanguage (current
>>>>>> limit is 600 stacked calls, if I'm not mistaken), so you better code
>>>>>> this kind of things in a loop instead
>>>>>>
>>>>>> Best regards
>>>>>>
>>>>> Bonjour Fabrice,
>>>>> long time no see ...
>>>>>
>>>>> Hell you are right :
>>>>> PROCEDURE OverFlow(LOCAL _newVal is int = 0, _iterations is unsigned int
>>>>> = 500)
>>>>> newval is int = _newVal
>>>>> IF newval < _iterations THEN
>>>>> newval++
>>>>> OverFlow(newval)
>>>>> ELSE
>>>>> RESULT newval
>>>>> END
>>>>>
>>>>> works ...
>>>>> BUT increasing _iterations to 600 -> OverFlow() already fails.*
>>>>> Shi*,
>>>>>
>>>>> Bjoern
Message forwarded from pcsoft.us.windev
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: