Well after some serious head scratching and a few trial&error runs, I was finally able to get the results we needed.

Appreciate the list's help ;)



>> R. Joseph Newton wrote:
Mike Blezien wrote:


Hello all,

working on creating a category/sub category data file, somthing like this:

Animations::Mini::3D-Miscellaneous
Clip_Art::People-Stick_People::Business::Household-Furniture
Icons::BMP-Computers::32x32icons-Computers

the first field in each line is the main category, followed by their respective
sub categories... and this file needs to be updated on a daily basices.. the
problem I'm having is when adding new sub categories to a matching main
category, is avoiding duplications of sub cateogories.


Hi Mike,

I have dealt with this issue myself, in a VB-based ActiveX control I did some development work on. I would say that you may be jumping too quickly into detail, with too little structure, for the kind of problem you are taking on.

Structures nested to arbitrarily deep levels are inherently recursive. You probably need to develop some recursive functions to create, add and delete node from your tree. You probably should create some sort of node object to manage each node. [Hint: having a parent attribute in this object will provide a very elegant linking mechanism A gather_children function can then easily be constructed by querying for parent fields matching the key of the node of interest.]

Ultimately, only the full path of inheritance can be guaranteed to be a primary key over any entire tree. I've got a chm system with a few topics related to ways of maintaining uniqueness of keys, and of optimizing thier length, within a whole system. It probably would not be appropriate to post it to the list, though. I may convert the source to less M$ specific HTML, and make it available as a web site.

My guess is that this will get somewhat more complicated, and that you will want to modularize the processes that go into loading and serializing the tree, as well as handling its data.

Joseph





-- Mike<mickalo>Blezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain Internet Publishing Providing Internet Solutions that work! http://www.thunder-rain.com Web Hosting http://www.justlightening.net Tel: 1(985)902-8484 MSN: [EMAIL PROTECTED] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to