>>Just keep in mind you can not pass parameters or get back return values with BINDEVENT. However, you can handle this with setting other properties that the bound method can then use. The method in turn, can set other properties that can be read after the method fires.
>
>Question on this.
>
>If you bindevent to a property can you change the property from this event or you fall in a endless loop?
I changed the code as follows and ran it. The method only fired the original time.
PRIVATE o, x
o = NEWOBJECT('Empty')
ADDPROPERTY(o, 'FireInit')
x = NEWOBJECT('EmptyMethods')
BINDEVENT(o, 'FireInit', x, 'FireInit')
CLEAR
o.FireInit = .t.
DEFINE CLASS EmptyMethods AS Custom
PROCEDURE FireInit
IF TYPE('o.FireInit') = "N"
o.FireInit = o.FireInit + 1
ELSE
o.FireInit = 1
ENDIF
WAIT WINDOW NOWAIT 'FireInit fired - ' + TRANSFORM(o.FireInit)
ENDPROC
PROCEDURE Release
RELEASE THIS
ENDPROC
ENDDEFINE
Mark McCasland
Midlothian, TX USA