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

T Lee Davidson t.lee.davidson at gmail.com
Sat Feb 11 05:34:25 CET 2023


On 2/10/23 17:23, Benoit Minisini wrote:
> The compiler only knows the classes of the components you explicitly check in the project property dialog.
> 
> It does not know the classes of the components you load at runtime. You have to declare them one by one with the "CLASS" 
> keyword, in each source file where that class is used. You won't have automatic completion either.

Ah, so the code for FMain.class in Gianluigi's demo project simply needs to be:
[code]
' Gambas class file

Class HtmlDocument

Public Sub Form_Open()

   Dim a As HtmlDocument ' <--- No longer an unknown identifier: HtmlDocument !!!

   Print
   Print "OPEN FMAIN"
   For Each c2 As Class In Classes
     If c2.Name Begins "HtmlDoc" Then Print c2.Name
   Next
   Print "^^^^^^^^^^^^"

End
[/code]


-- 
Lee



More information about the User mailing list