Results 1 to 14 of 14

Thread: Equivalent syntax using a class ?

  1. #1

    Thread Starter
    Frenzied Member David.Poundall's Avatar
    Join Date
    Sep 2002
    Location
    Robin Hood Land
    Posts
    1,457

    Resolved Equivalent syntax using a class ?

    Can anyone enlighten me as to a class based syntax that will allow me to do the equivalent of this...

    Code:
    Public Type SomethingElse
        Index as Long
        Order as Long
        Ref as String
    EndType
    
    Public Type Something
        Name as String
        Group() as SomethingElse
    End type
    
    Public Thing as Something
    Thanks in advance

    .
    Last edited by David.Poundall; Dec 26th, 2004 at 12:23 PM.
    David

    Learn the Rules so that you know how to break them properly.

    Printing dll dBTools MZTools Winsock API WinsockVB More Winsock SGrid2 MSChart Mail2Web

    If you have found this thread useful then read this

  2. #2

    Thread Starter
    Frenzied Member David.Poundall's Avatar
    Join Date
    Sep 2002
    Location
    Robin Hood Land
    Posts
    1,457

    Re: Equivalent syntax using a class ?

    The only thing that I can come up with myself is...

    Code:
        Something_Name As String
        Something_Group As Long
              ' Use the Group value as an index as a pointer 
              ' to the following one D arrays
              Index() As Long
              Order() As Long
              Ref() As String
    is there another way ?

    .
    David

    Learn the Rules so that you know how to break them properly.

    Printing dll dBTools MZTools Winsock API WinsockVB More Winsock SGrid2 MSChart Mail2Web

    If you have found this thread useful then read this

  3. #3
    Banned
    Join Date
    Dec 2004
    Posts
    174

    Re: Equivalent syntax using a class ?

    im sorry but you cant make user difened types public in class i dont know why. but i do know that it sux

  4. #4

  5. #5

    Thread Starter
    Frenzied Member David.Poundall's Avatar
    Join Date
    Sep 2002
    Location
    Robin Hood Land
    Posts
    1,457

    Re: Equivalent syntax using a class ?

    Yep - it sucks alright. I shall have to stick to Globals for my complex types then I fear. Thanks _visual_basic_
    David

    Learn the Rules so that you know how to break them properly.

    Printing dll dBTools MZTools Winsock API WinsockVB More Winsock SGrid2 MSChart Mail2Web

    If you have found this thread useful then read this

  6. #6

  7. #7

    Thread Starter
    Frenzied Member David.Poundall's Avatar
    Join Date
    Sep 2002
    Location
    Robin Hood Land
    Posts
    1,457

    Re: Equivalent syntax using a class ?

    Hmm. I hadn't though of taking the next level into a different class. Thanks for the left field approach Marty.

    .
    David

    Learn the Rules so that you know how to break them properly.

    Printing dll dBTools MZTools Winsock API WinsockVB More Winsock SGrid2 MSChart Mail2Web

    If you have found this thread useful then read this

  8. #8

  9. #9

    Thread Starter
    Frenzied Member David.Poundall's Avatar
    Join Date
    Sep 2002
    Location
    Robin Hood Land
    Posts
    1,457

    Re: Equivalent syntax using a class ?

    I am ending up doing something similar using a directory type instead of the SomethingElse class. Name will be the index within the directory (EDIT oops -I meant Dictionary) type.

    BTW, Merry Christmas Marty

    .
    Last edited by David.Poundall; Dec 26th, 2004 at 12:52 PM.
    David

    Learn the Rules so that you know how to break them properly.

    Printing dll dBTools MZTools Winsock API WinsockVB More Winsock SGrid2 MSChart Mail2Web

    If you have found this thread useful then read this

  10. #10
    Banned
    Join Date
    Dec 2004
    Posts
    174

    Re: Equivalent syntax using a class ?

    what is dictionary?

  11. #11

    Thread Starter
    Frenzied Member David.Poundall's Avatar
    Join Date
    Sep 2002
    Location
    Robin Hood Land
    Posts
    1,457

    Re: Equivalent syntax using a class ?

    Dictionary is a type of collection that has better exposrure of the indexes. It happens to be faster than collections but not as fast as arrays.

    Do a search of the forum. There has been some recent posts on the subject.
    David

    Learn the Rules so that you know how to break them properly.

    Printing dll dBTools MZTools Winsock API WinsockVB More Winsock SGrid2 MSChart Mail2Web

    If you have found this thread useful then read this

  12. #12

    Thread Starter
    Frenzied Member David.Poundall's Avatar
    Join Date
    Sep 2002
    Location
    Robin Hood Land
    Posts
    1,457

    Re: Equivalent syntax using a class ?

    David

    Learn the Rules so that you know how to break them properly.

    Printing dll dBTools MZTools Winsock API WinsockVB More Winsock SGrid2 MSChart Mail2Web

    If you have found this thread useful then read this

  13. #13
    Banned
    Join Date
    Dec 2004
    Posts
    174

    Re: Equivalent syntax using a class ?

    sweet...
    where can i get the file that contains dictionary?

  14. #14

    Thread Starter
    Frenzied Member David.Poundall's Avatar
    Join Date
    Sep 2002
    Location
    Robin Hood Land
    Posts
    1,457

    Re: Equivalent syntax using a class ?

    It comes in the same reference as FSO (namely, scrrun.dll).

    The syntax it is different enough from collections that you will find yourself scratching your head at the start.

    But definitely a usefull tool to have in the box.

    .
    David

    Learn the Rules so that you know how to break them properly.

    Printing dll dBTools MZTools Winsock API WinsockVB More Winsock SGrid2 MSChart Mail2Web

    If you have found this thread useful then read this

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