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

Gianluigi gradobag at gradobag.it
Sat Feb 11 08:13:11 CET 2023


Il 11/02/23 05:34, T Lee Davidson ha scritto:
> 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]
>
>
Hi Lee,

thanks for the clarification, now I understand :-)

Regards

Gianluigi



More information about the User mailing list