Vbscript Classes

Results 1 to 2 of 2

Thread: Vbscript Classes

  1. #1
    Join Date
    Dec 1969

    Default Vbscript Classes

    Can i initialize an object with a value?<BR>For example say i have a class named user<BR><BR>can i do the following:<BR><BR>Set myUser = New User("Martin")<BR>or anything like that?<BR>how would i handle that in my class definition?

  2. #2
    Join Date
    Dec 1969

    Default Nope...

    ...one of the limitations of VBS.<BR><BR>You have to do it in two steps:<BR><BR>Set myUser = New User<BR>myUser.Initialize "Martin"<BR><BR>("Initialize" is an arbitrary name, but I like to use it for all classes so I don&#039;t have to remember what I chose in a given case.)<BR><BR>

Posting Permissions

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