[Gambas-user] Problem with Component.Load("gb.xml.html")

Claus Dietrich claus.dietrich at freenet.de
Fri Feb 10 14:08:06 CET 2023


Hi

I am currently developing a new class. It shall make use of the 
component gb.xml.http,

but it shall only be loaded, if the target application doesn't use it 
yet. So what I do is the

following in the _new routine of my class:

Public Sub _new()

If Not Component.IsLoaded("gb.xml.html") Then
    Component.Load("gb.xml.html")
Endif

..

End

The component is definitely loaded but when I try to use it in a sub of 
my class, i.e.

Public Sub ParseHTML(sHTML)

Dim hDoc As New HtmlDocument

...

End

I get the error "unknown ... HtmlDocument " in line "Dim hDoc As New 
HtmlDocument".

When I add this component to the project as usual, everything is fine.

My mistake? A bug?

Best regards

Claus






More information about the User mailing list