[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: USE Command only for Gambas Scripting?
[Thread Prev] | [Thread Next]
- Subject: Re: USE Command only for Gambas Scripting?
- From: Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
- Date: Wed, 4 Sep 2024 14:56:48 +0200
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Le 04/09/2024 à 14:49, Claus Dietrich a écrit :
In order to simplify the implementation of my pdf-help-viewer in other apps I added following lines at the top of the form class declarations:' Gambas class file Use "gb.poppler" Class PdfDocument Class PdfIndex ...and unmarked the gb.poppler component in the project properties. So far this works fine, but the Gambas Wiki says, that the USE command is for Gambas scripting with gbs3 only: https://gambaswiki.org/wiki/lang/useIs there a mistake in the Wiki? Best regards Claus
Yes.`Use "gb.poppler"` at the top of your class is equivalent to have `Component.Load("gb.poppler")` in the class static initializer.
In other words, it loads the 'gb.poppler' component the first time your class is used.
Note that in the development version, you can now check a component so that it is not loaded at program startup, but you can use its classes without having to declare them with the 'Class' keyword.
Regards, -- Benoît Minisini.
Re: USE Command only for Gambas Scripting? | BB <adamnt42@xxxxxxxxx> |
Re: USE Command only for Gambas Scripting? | Claus Dietrich <claus.dietrich@xxxxxxxxxx> |
USE Command only for Gambas Scripting? | Claus Dietrich <claus.dietrich@xxxxxxxxxx> |