Results 1 to 5 of 5

Thread: Tree hierarchy

Threaded View

  1. #1

    Thread Starter
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Tree hierarchy

    I'm making a chat server with a bunch of different rooms. Chat rooms will be stored in a "tree hierarchy" form, like this (think of a message board like this one):

    Code:
    Category 1
        Room 1
        Room 2
        Room 3
    
    Category 2
        Sub category 1
            Room 1
            Room 2
            Room 3
    I will be storing and using them from a UDT array, similar to this:

    Code:
    Type CHAT_ROOM
        dblID As Double 'ID of chat room.
        dblParentID As Double 'ID of parent room/category.
        strName As String 'Name of chat room/category.
        IsRoom As Boolean 'To tell if it is a chat room or a category.
    End Type
    
    Private udtRooms() As CHAT_ROOM 'Array to store all chat rooms.
    There's actually a lot more properties than that, but that's the basic form.

    I'm getting confused on how to set the parent ID for each item. I'm making a dialog in the server so I can create/edit the default chat rooms.

    When someone joins a room the client will refer to the room's ID instead of the name, ie:

    "JOIN #room number"

    I attached a screenshot.
    Last edited by DigiRev; Mar 26th, 2007 at 02:54 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width