Antwise community forums
dBase 2019: AntViewAx.AntViewDocument - Printable Version

+- Antwise community forums (https://forums.antwise.com)
+-- Forum: Antview (https://forums.antwise.com/forumdisplay.php?fid=11)
+--- Forum: Antview for Windows (https://forums.antwise.com/forumdisplay.php?fid=12)
+--- Thread: dBase 2019: AntViewAx.AntViewDocument (/showthread.php?tid=143)



dBase 2019: AntViewAx.AntViewDocument - Vasile - 2022-12-29

Cannot use the AntView Document interface.

Document.CurrentBrowser is null regardless of whether it is assigned with

Document.CurrentBrowser  = EdgeWebBrowser.IDispatchPointer

or by calling the method

Document.BrowserDispatch(EdgeWebBrowser.IDispatchPointer)

dBase 2019 example in attachment.

Thank you
Vasile.


RE: dBase 2019: AntViewAx.AntViewDocument - wila - 2022-12-29

Vasile,

That's peculiar.

I will have a look, but currently don't have dBase 2019 installed, so will have to get a trial version for testing that.
But before I go down that path...

Does dBase have a way to get the dispatch pointer of an ActiveX control itself?
If so then you could use that as well instead of the IDispatchPointer property.
Also can you see if the IDispatchPointer property is returning a non zero value?

Let me add some extra logging details for troubleshooting this, so that a log file at level 2 gives me some details on what is actually happening. I will email you a private version, with steps for setting the logging later today.

--
Wil


RE: dBase 2019: AntViewAx.AntViewDocument - Vasile - 2022-12-29

(2022-12-29, 11:13:33)wila Wrote: Vasile,

That's peculiar.

I will have a look, but currently don't have dBase 2019 installed, so will have to get a trial version for testing that.
But before I go down that path...

Does dBase have a way to get the dispatch pointer of an ActiveX control itself?
If so then you could use that as well instead of the IDispatchPointer property.
Also can you see if the IDispatchPointer property is returning a non zero value?

Let me add some extra logging details for troubleshooting this, so that a log file at level 2 gives me some details on what is actually happening. I will email you a private version, with steps for setting the logging later today.

--
Wil

Does dBase have a way to get the dispatch pointer of an ActiveX control itself?
Yes,   .ACTIVEX1.nativeobject    // this.ACTIVEX1.nativeobject

Also can you see if the IDispatchPointer property is returning a non zero value?
Not null.  
this.ACTIVEX1.nativeobject.IDispatchPointer has a reference (pointer) to 
this.ACTIVEX1.nativeobject

Thank you
Vasile

PS.
dBase 2019 link:
http://www.dbase.com/support/updates-and-fixes/

direct download link  (30 days evaluation )
https://www.dbase.com/downloads/dBASE201900b2618Full20200218.exe

in command prompt:
cd "The path where TestAntView.wfm was saved"

// open in designer
modi form  TestAntView.wfm

// open in source editor
modi comm  TestAntView.wfm

// run
do TestAntView.wfm


RE: dBase 2019: AntViewAx.AntViewDocument - Vasile - 2022-12-29

Hi Wil

Attached is the log file.

Thank you,
Vasile


RE: dBase 2019: AntViewAx.AntViewDocument - wila - 2022-12-29

(2022-12-29, 17:36:22)Vasile Wrote: Hi Wil

Attached is the log file.

Thank you,
Vasile

Thanks,

According to the following lines:

2022-12-29 15:55:48.957 NavigateSync returns 0
2022-12-29 15:55:48.959 BrowserDispatch assigning IDispatch result True
2022-12-29 15:55:48.960 Document object assigned to browser OK.

The assignment worked.

The last line can only work if the connection between the Document object and the AntView object is setup.

So why do you think it doesn't work?

edit: Reread your original question, I think I understand what is happening.

CurrentBrowser is indeed a property, but it is a write only property. This is a bit weird I guess.
It is not an abnormal thing for the ActiveX specifications, but it might be unexpected.

I will update the documentation to make that more clear.
--
Wil


RE: dBase 2019: AntViewAx.AntViewDocument - Vasile - 2022-12-30

Hi Wil

>So why do you think it doesn't work?
I'm new to using the AntView control, so I've been checking the properties and methods.
I didn't understand why after assigning the pointer of the AntViewAx.AntViewDocument object to AntViewAx.AntViewDocument.CurrentBrowser , it still remained null.
Now I understand and can confirm that AntViewAx.AntViewDocument works correctly.

Thank you very much. Your support is amazing !

Vasile

PS. I have a question for which I will open a new thread.


RE: dBase 2019: AntViewAx.AntViewDocument - wila - 2022-12-30

Vasile,

Your reasoning makes perfect sense.
Glad to hear that it is working now.

This was clearly not well documented, I have updated the documentation.
Thanks for bringing this to my attention.

--
Wil