Initialize event won't fire in vbscript v5 
Author Message
 Initialize event won't fire in vbscript v5

Who can tell me if there is a bug using the Initialize event, because I
can't make it work.

Is this the right way to use the Initialize event or not ?

class clsTest
  dim a
  dim b
  private sub clsTest_Initialize()
    me.a="Hello"
    me.b=" World"
  end sub
end class

dim obj
set obj = new clsTest   'the initialize event should fire at this statement
Msgbox obj.a & obj.b



Sat, 02 Mar 2002 03:00:00 GMT  
 Initialize event won't fire in vbscript v5
I believe the correct name for the event is class_initialize - do NOT
substitute your class name for the leading class.

HTH.

-Mike


Quote:

>Who can tell me if there is a bug using the Initialize event, because I
>can't make it work.

>Is this the right way to use the Initialize event or not ?

>class clsTest
>  dim a
>  dim b
>  private sub clsTest_Initialize()
>    me.a="Hello"
>    me.b=" World"
>  end sub
>end class



Sat, 02 Mar 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Timer Event won't fire when app doesn't have focus

2. Timer Event won't fire when app doesn't have focus

3. Button events won't fire when editing a cell

4. Inspector Event - Won't Fire Consistently

5. Click event won't fire on a user control

6. Why won't the mousedown event fire?

7. UserControl won't fire Events

8. Terminate event won't fire after Unload

9. ActiveX DLL events won't fire when DLL shows Modal Form

10. Multiline Windowless (Lightweight) text box: Change event won't fire

11. User Control won't FIRE EVENTS

12. winsock UDP problem - SendComplete Event won't fire

 

 
Powered by phpBB® Forum Software