Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Can a function take a Class as parameter?

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Can a function take a Class as parameter?
  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 >>
 Can a function take a Class as parameter? - 11/14/2005 11:08:15 PM   
  jaloplo

 

Posts: 2
Score: 0
Joined: 11/14/2005
Status: offline
Hi,

I have a problem and I don't know how to solve it.

I have two classes, one is an element (eClass)  of the other (pClass). The parent class have an array of elements eClass. There is a function where you can add a new element of the array:


Public
Sub AddMenu(wmItem)


m_size = m_size + 1

Redim Preserve m_wmi(m_size)

m_wmi(m_size) = wmItem


End Sub
 
When I call this function, asp returns this error:


Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'm_wmi'
/asp/inc/menuClass.vbs, line 27

I've changed the last line and assigned number 5 instead of wmItem. After that it works properly. So, I think it is impossible to instantiate any class array, isn't it????

What do you think about that??? Or Do I have an error in the code????

 
 
 
Post #: 1
 
 RE: Can a function take a Class as parameter? - 11/14/2005 11:23:01 PM   
  jaloplo

 

Posts: 2
Score: 0
Joined: 11/14/2005
Status: offline
 
I HAVE ITTTTT!!!!!

It as simply as write this line:

Set m_wmi(m_size) = wmItem

Sorry for the troubles.

(in reply to jaloplo)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Can a function take a Class as parameter? 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