ActiveX problem
Publicado: Lun Feb 19, 2007 9:41 am
Hi,
perhaps someone can give me an advise regarding this problem I have with an
ActiveX control:
CLASS TForm1 FROM TForm
COMPONENT oMapSource
COMPONENT oMapControl
...
METHOD CreateForm()
METHOD FormInit( oSender )
ENDCLASS
#include "eTPMain.xfm"
//---------------------------------------------------------- --------------------
METHOD FormInit( oSender ) CLASS TForm1
WITH OBJECT ::oMapSource := TMGCMapSource():New( ::oFldMap )
:Create()
msginfo( :CurrentMapName ) // shows a correct value
END WITH
WITH OBJECT ::oMapControl := TMGCMapControl():New( ::oFldMap )
:nLeft := 0
:nTop := 0
:nWidth := 200
:nHeight := 200
:Create()
:ToolbarVisible := .f.
:nAlign := alClient
END WITH
msginfo( ValType( ::oMapControl )) // returns "O"
// everything works up to now but the next line generates an error
(please see the attached error.log)
::oMapControl:MapSource := ::oMapSource
RETURN Nil
I attached the source code of the MGCMapControl and MGCMapSource classes,
too.
Best regards, Timm.
Attached files ActiveX problem.zip (1.7 KB)Â
perhaps someone can give me an advise regarding this problem I have with an
ActiveX control:
CLASS TForm1 FROM TForm
COMPONENT oMapSource
COMPONENT oMapControl
...
METHOD CreateForm()
METHOD FormInit( oSender )
ENDCLASS
#include "eTPMain.xfm"
//---------------------------------------------------------- --------------------
METHOD FormInit( oSender ) CLASS TForm1
WITH OBJECT ::oMapSource := TMGCMapSource():New( ::oFldMap )
:Create()
msginfo( :CurrentMapName ) // shows a correct value
END WITH
WITH OBJECT ::oMapControl := TMGCMapControl():New( ::oFldMap )
:nLeft := 0
:nTop := 0
:nWidth := 200
:nHeight := 200
:Create()
:ToolbarVisible := .f.
:nAlign := alClient
END WITH
msginfo( ValType( ::oMapControl )) // returns "O"
// everything works up to now but the next line generates an error
(please see the attached error.log)
::oMapControl:MapSource := ::oMapSource
RETURN Nil
I attached the source code of the MGCMapControl and MGCMapSource classes,
too.
Best regards, Timm.
Attached files ActiveX problem.zip (1.7 KB)Â