Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Prototyping

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,3220
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Prototyping
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Prototyping - 6/4/2005 5:40:20 AM   
  TNO


Posts: 1397
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
JavaScript has the ability to create new objects and prototype new properties to them. Does vbscript have a similar ability?
JavaScript OOP:
http://www.wsabstract.com/javatutors/object.shtml

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch
 
 
Post #: 1
 
 Re: Prototyping - 6/4/2005 7:54:54 AM   
  beaker

 

Posts: 78
Score: 0
Joined: 1/27/2005
From: USA
Status: offline
Yes, two things:

1. Windows Script Components (WSC) which can be written in either VBScript or JScript.
2. The VBS 'class' statement, which allows you to create an object with variables, properties, and methods.

I have not used either. I would be interested if you could contrive an example by using one of these two methods to create something neat and post it here for the interest of the readers.

(in reply to TNO)
 
 
Post #: 2
 
 Re: Prototyping - 6/5/2005 3:20:17 PM   
  TNO


Posts: 1397
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
By popular request.......

A quick sample:

Dim myEmployee
Set myEmployee = New clsEmployee

myEmployee.EmployeeName = "John Doe"

Response.Write "name: "

myEmployee.PrintEmployeeName


I'm so much more use to JavaScript, so the more I come up with in vbs, the more I'll add. If any one else can add some examples please do.

(in reply to TNO)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Prototyping Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts