[Gambas-user] Compiled version of class

Olivier Coquet ocoquet at 3d-phenomen.fr
Thu Jan 14 08:44:53 CET 2021


Hi Bruce,

there are several reasons why..

First: For users who just want to use the class as it is, it is easier 
to check a component in the interface than to fetch a class and 
copy/paste it.

Second: For a program published as a binary packet, it is simpler to 
make a component update available than to propose the complete reinstall 
of the program.

Thirdly: for the answer to users' questions, it is important to be sure 
of the version of the component they are using, apart from a copy/paste 
leaves the possibility to modify (voluntarily or accidentally) the 
class, which does not allow to be sure of the integrity of the code.

Finally: The use of components is a good practice that I think is an 
integral part of the Gambas Basic "guide-line" as defined by Benoît.

Here is the why of the how :)

Regards

Olivier
http://forum.3d-phenomen.fr/

Le 13/01/2021 à 21:10, Bruce Steers a écrit :
> why not just import the non compiled class source into your project?
>
> My script editor here https://gitlab.com/bsteers4/scripted 
> <https://gitlab.com/bsteers4/scripted>
> I imported from gambas the class files for TerminalView class and 
> TextEditor and customised them to my own needs.
>
> Much better to have the class as an internal part of the program and 
> not an external file that may or may not be easy to install.
>
> BruceS
>
> On Wed, 13 Jan 2021 at 17:46, Olivier Coquet <ocoquet at 3d-phenomen.fr 
> <mailto:ocoquet at 3d-phenomen.fr>> wrote:
>
>     Hi, i try to make a component and after read the doc, component is
>     working, but....
>
>     If I understand all, component is distribution dependent, if i
>     publish
>     it in deb format, Fedora can't install it ???? (for example)
>
>     This is a constraint.
>
>     Olivier Coquet
>
>     Le 13/01/2021 à 15:54, Linus via User a écrit :
>     > Hello,
>     >
>     > Yes it’s possible in Gambas, take a look a create a library or a
>     Component (better) of your project.
>     >
>     > After that you could load your new Library/Component in any
>     other project.
>     >
>     > You can look at a component I have posted in the Farm of Gambas
>     >
>     > Farm ==> Library ==> gb.sshclient1.1.5
>     >
>     > Take a look at the Properties Panel ==> Information
>     > and if you try to Build the package by the IDE, you should see
>     all options I have set.
>     >
>     > This is just an example that could point you to a direction.
>     >
>     >
>     > Olivier Cruilles
>     >
>     >
>     >> Le 13 janv. 2021 à 05:33, Olivier Coquet
>     <ocoquet at 3d-phenomen.fr <mailto:ocoquet at 3d-phenomen.fr>> a écrit :
>     >>
>     >> hi all,
>     >>
>     >> Is there a way to join/include ??? compiled version of a single
>     class in a project ?
>     >>
>     >>
>     >> regards
>     >>
>     >> Olivier
>     >>
>     >>
>     >> ----[ http://gambaswiki.org/wiki/doc/netiquette
>     <http://gambaswiki.org/wiki/doc/netiquette> ]----
>     >
>     > ----[ http://gambaswiki.org/wiki/doc/netiquette
>     <http://gambaswiki.org/wiki/doc/netiquette> ]----
>
>     ----[ http://gambaswiki.org/wiki/doc/netiquette
>     <http://gambaswiki.org/wiki/doc/netiquette> ]----
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210114/98668ee5/attachment.htm>


More information about the User mailing list