Página 1 de 1

ActiveX problem

Publicado: Lun Feb 19, 2007 9:41 am
por Guest
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)Â

ActiveX problem

Publicado: Lun Feb 19, 2007 10:27 am
por jfgimenez
Timm,
> // everything works up to now but the next line generates an error
> (please see the attached error.log)
> ::oMapControl:MapSource := ::oMapSource
Please, try:
::oMapControl:MapSource := ::oMapSource:Ocx
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info

ActiveX problem

Publicado: Lun Feb 19, 2007 10:27 am
por jfgimenez
Timm,
> // everything works up to now but the next line generates an error
> (please see the attached error.log)
> ::oMapControl:MapSource := ::oMapSource
Please, try:
::oMapControl:MapSource := ::oMapSource:Ocx
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info

ActiveX problem

Publicado: Lun Feb 19, 2007 11:56 am
por Guest
Jose,
many thanks, works great!
Best regards, Timm
"Jose F. Gimenez" <jfgimenez@wanadoo.es> schrieb im Newsbeitrag
news:45d96d63$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
> Timm,
>
>> // everything works up to now but the next line generates an error
>> (please see the attached error.log)
>> ::oMapControl:MapSource := ::oMapSource
>
> Please, try:
>
> ::oMapControl:MapSource := ::oMapSource:Ocx
>
> --
> Regards,
>
> Jose F. Gimenez
> http://www.xailer.com
> http://www.xailer.info
>

ActiveX problem

Publicado: Lun Feb 19, 2007 11:56 am
por Guest
Jose,
many thanks, works great!
Best regards, Timm
"Jose F. Gimenez" <jfgimenez@wanadoo.es> schrieb im Newsbeitrag
news:45d96d63$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
> Timm,
>
>> // everything works up to now but the next line generates an error
>> (please see the attached error.log)
>> ::oMapControl:MapSource := ::oMapSource
>
> Please, try:
>
> ::oMapControl:MapSource := ::oMapSource:Ocx
>
> --
> Regards,
>
> Jose F. Gimenez
> http://www.xailer.com
> http://www.xailer.info
>