Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dBase 2019: AntViewAx.AntViewDocument
#1
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.


Attached Files Thumbnail(s)
   

.zip   TestAntView.zip (Size: 1.13 KB / Downloads: 1)
Reply
#2
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
Reply
#3
(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/dBASE201...200218.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
Reply
#4
Hi Wil

Attached is the log file.

Thank you,
Vasile


Attached Files
.zip   AntViewLog.zip (Size: 1.44 KB / Downloads: 3)
Reply
#5
(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
Reply
#6
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.
Reply
#7
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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)