Also, in my CABuilder.prg file, the following procedure should be changed to the following:
PROTECTED PROCEDURE Cr8_AutoOpenCode
TEXT TO THIS.cAutoOpenCode NOSHOW PRETEXT 1
if not pemstatus(This, '__VFPSetup', 5)
This.AddProperty('__VFPSetup', 1)
This.Init()
endif
IF NOT DODEFAULT()
RETURN .F.
ENDIF
NODEFAULT
ENDTEXT
ENDPROC
Move the IF NOT DODEFAULT() lines of code to the bottom instead of at the top. Also make this change in any VCXs you have already created with this builder.
>Thank's Mark !
>It solved the problem.
>
>I saw in your code that its necessary to insert THIS.INIT() in the AutoOpen, with this I discovered that the sequence of events in CA is not the same if I have the code of the Init event writen by the VFP Builder, and if the CA used is based in a class like yours.
>I belived that if the CA Init event is readed first with all the properties by VFP when created by VFP builder the same would happen with a CA class, but now I know it's not this way it happens.
>I just cant understand this behavior.
>
>Thanks again.
>
>Peter
Mark McCasland
Midlothian, TX USA