Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TreeView and psudeo code

Status
Not open for further replies.

801119

Programmer
Apr 10, 2000
311
SE
Greetings all...

I'm working on a small project of my own, and need to make a listing of directories. I have this psuedo code for searching from <root> dir. And i was wondering if I've made it correct, or missed something important in the code?? And if it is correct then will it work as it should? that is, to create a tree heirarky in the component TreeView1 ?

Code:
root()
    for each folder in root
        folder = first folder
        dir(folder[folder])
        folder = next folder
    stop
stop

dir(folder)
    for each folder in folder
        folder = first folder
            add item
            open folder
                add sub_item
            close folder
        folder = next folder
        dir(folder)
    stop
stop

My codes look like something a kid wrote
I have absolutely no idea what I am talking about
Somehow I still manage to make it work
 
That looks about right but as always, the devil is in the details.


James P. Cottingham

When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity.
[tab][tab]Albert Einstein explaining his Theory of Relativity to a group of journalists.
 
While researching another program, I ran across some C++ Builder Developer's Journalarticles you might find applicable to your problem. They can be found in the public area ( under September 2000, November 2000, January 2001, and February 2001.


James P. Cottingham

When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity.
[tab][tab]Albert Einstein explaining his Theory of Relativity to a group of journalists.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top