Re: [Gambas-user] Sharing Code Between Projects

2017-06-07 Thread Benoît Minisini via Gambas-user

Le 07/06/2017 à 16:25, adamn...@gmail.com a écrit :


I think you need to understand a lot more about libraries and
components. Libraries are useful for one developer trying to re-use
code between projects on a single machine. If you are talking about
deploying shared code in a way that it can be used by different
people developing different projects on different machines then you
need to look at the component mechanism.  There is really no
programming difference between a library and a component (except when
talking about gui controls).  The difference is how and where they
are deployed. Libraries are (or were,until the naming convention
changed :-< ) simple and easy. Components offer more deployment
options but require a bit more packaging effort.

b



Actually, components are more like extensions to the Gambas language, 
and should be distributed with the Gambas source code.


So you should always make libraries for your own needs.

A library package is installed system-wide, and can be used by any 
Gambas program, as now the reference to the library is based on its 
name, not its absolute path as it was before.


A library used by a project is referenced by its vendor, and by its name.

When the project is executed, the library is searched in the following 
paths, in that order:


1) '/.gambas' (for 
backward-compatibility).


2) '$XDG_DATA_HOME/gambas3/lib//:.gambas' (if 
$XDG_DATA_HOME is defined).


3) '~/.local/share/gambas3/lib//:.gambas', (if 
$XDG_DATA_HOME is NOT defined).


4) '//:.gambas' 
(the project extra archive directory is a project property defined in 
the 'library' tab of the project property dialog).


5) '/usr/lib/gambas3//:.gambas' (library packages 
are installed there, system-wide).


6) '/usr/bin//.gambas' (standard gambas programs can be 
used as libraries).


I suggest not to use the 1) and 6) feature, they are there for 
backward-compatibility mainly.


2) & 3) are there for user-wide installation of libraries. Libraries are 
installed user-wide when you make an executable from their source 
project ; or when you install a library from the gambas farm.


I hope all that was clear!

Regards,

--
Benoît Minisini

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Sharing Code Between Projects

2017-06-07 Thread PICCORO McKAY Lenz
maybe its a good idead paste more clarelly that in gambas wiki..  the
documentation lack of that explanations, so right documentation its
important!

2017-06-07 10:25 GMT-04:00 adamn...@gmail.com :

> useful for one developer trying to re-use code between projects on a
> single machine. If you
>
library its limited to hardcoded path's.. so that was the problem in the
past


> are talking about deploying shared code in a way that it can be used by
> different people developing different projects on different machines then
> you need to look at the component
>
the problem with componente its the deploy system was not so simple..

my solution was used git submodules.. more standard way and more
generalized.. a manpower when comes and started, comes with git knowledge
with it!


> mechanism.  There is really no programming difference between a library
> and a component (except when talking about gui controls).  The difference
> is how and where they are deployed.
>
components it th right choice for distributed projects.. the only problem
its that must be deployed to all users can implement the result code
functions.. and not directly in IDE repository code..


>
> Libraries are (or were,until the naming convention changed :-< ) simple
> and easy.

yes.. right choice for local only projects but hardcoded paths limit the
usage of in distribute projects


> Components offer more deployment options but require a bit more packaging
> effort.
>
its the right choice for distribute projects, but limited to gambas only
usage and need deploy..

maybe its a good idead paste more clarelly that in gambas wiki..  the
documentation lack of that explanations


>
> b
>
> --
> B Bruen 
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Sharing Code Between Projects

2017-06-07 Thread adamn...@gmail.com
On Wed, 7 Jun 2017 09:38:52 -0400
PICCORO McKAY Lenz  wrote:

> 2017-06-07 7:33 GMT-04:00 Christof Thalhofer :
> > Am 06.06.2017 um 16:13 schrieb alexchernoff:
> >> The goal is to edit shared centralised modules and having all
> >> projects see the changes.
> >
> > You can do this by creating a project as library. After you compiled it
> > once and mad an executable with Ctrl-Alt-X, all modules and classes with
> > the magic word "Export" in the beginning are shared by the library and
> > can be used in other projects.
> umm i was triying in the past that but not was as expected, i dont
> remenber why, i try right now and report feedback here... due i'm in
> same problem
> 
> >
> > You have to choose the library inside the other projects' definition
> > dialog (in the IDE).
> >
> > So you can outsource common code and use it in a lot of projects.
> >
> > http://gambaswiki.org/wiki/doc/library
> 
> umm seems the complication in the past was the locations of the
> codes.. all of this have hardcoded paths... in git submodules there-s
> no hardcode depends, due submodules can work off-line independen of..
> 
> if i moved the library from original path to another path, all the
> depends break down..
> 
> i'll try and later report feedback
> 
> >
> > Alles Gute
> >
> > Christof Thalhofer
> >
> > --
> > Dies ist keine Signatur
> >
> >
> > --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > ___
> > Gambas-user mailing list
> > Gambas-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user

gerhard

I think you need to understand a lot more about libraries and components. 
Libraries are useful for one developer trying to re-use code between projects 
on a single machine. If you are talking about deploying shared code in a way 
that it can be used by different people developing different projects on 
different machines then you need to look at the component mechanism.  There is 
really no programming difference between a library and a component (except when 
talking about gui controls).  The difference is how and where they are deployed.
Libraries are (or were,until the naming convention changed :-< ) simple and 
easy. Components offer more deployment options but require a bit more packaging 
effort.

b

-- 
B Bruen 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas-Documentation

2017-06-07 Thread PICCORO McKAY Lenz
Hi adamnt42,

2017-06-06 20:40 GMT-04:00 adamn...@gmail.com :
>
> What is the "Size" parameter in GetIcon(Size As Integer)?
>
> Where is a convenient place to talk about that question? I don't think it
really belongs in the mailing list as it may take a reasonable time before
someone with that knowledge notices the post and answers it. In the mean
time the post just drifts farther and farther down the time line.  I don't
think that adding content to the page concerned would work either, as the
person with the knowledge is not likely to be referring to the page in the
course of their normal day.

same happened to me on the ODBC documentation.. many errors happened and
due mail list dont answer quickly (and to not receive responses like "it's
obviously that") i decide triying by myselft.. that take me a lot of time
but well...the result was that ODBC module componente has some bugs
reported by me...

>
> And while I'm at it - how do you add an image to a wiki page? Like the
http://gambaswiki.org/wiki/howto/makereport/arrange.png?  in the "How to to
make a report with Gambas" page.  Note, I mean how do I upload the .png
files I want to put in a page, not how to reference it in the markup ( i.e.
I know "[doc/myhowto/blah.png]" ).

a big problem, graphical examples need images with those in action... for
that i not have a suggested solution due i not code too many desktop apps..
i made more daemons and services programs in gambas ...

>
> cheers
> b
>
> --
> B Bruen 
>
>
--
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Sharing Code Between Projects

2017-06-07 Thread PICCORO McKAY Lenz
2017-06-07 7:33 GMT-04:00 Christof Thalhofer :
> Am 06.06.2017 um 16:13 schrieb alexchernoff:
>> The goal is to edit shared centralised modules and having all
>> projects see the changes.
>
> You can do this by creating a project as library. After you compiled it
> once and mad an executable with Ctrl-Alt-X, all modules and classes with
> the magic word "Export" in the beginning are shared by the library and
> can be used in other projects.
umm i was triying in the past that but not was as expected, i dont
remenber why, i try right now and report feedback here... due i'm in
same problem

>
> You have to choose the library inside the other projects' definition
> dialog (in the IDE).
>
> So you can outsource common code and use it in a lot of projects.
>
> http://gambaswiki.org/wiki/doc/library

umm seems the complication in the past was the locations of the
codes.. all of this have hardcoded paths... in git submodules there-s
no hardcode depends, due submodules can work off-line independen of..

if i moved the library from original path to another path, all the
depends break down..

i'll try and later report feedback

>
> Alles Gute
>
> Christof Thalhofer
>
> --
> Dies ist keine Signatur
>
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Sharing Code Between Projects

2017-06-07 Thread Christof Thalhofer
Am 06.06.2017 um 16:13 schrieb alexchernoff:
> Correct, "import" only creates a local copy, and using a symlink 
> results in read only code in the IDE.
> 
> The goal is to edit shared centralised modules and having all 
> projects see the changes.

You can do this by creating a project as library. After you compiled it
once and mad an executable with Ctrl-Alt-X, all modules and classes with
the magic word "Export" in the beginning are shared by the library and
can be used in other projects.

You have to choose the library inside the other projects' definition
dialog (in the IDE).

So you can outsource common code and use it in a lot of projects.

http://gambaswiki.org/wiki/doc/library

Alles Gute

Christof Thalhofer

-- 
Dies ist keine Signatur



signature.asc
Description: OpenPGP digital signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas-Documentation

2017-06-07 Thread Benoît Minisini via Gambas-user

Le 07/06/2017 à 02:40, adamn...@gmail.com a écrit :

I think one of the things that is hard about doing something about
the documentation is that there does not appear to be any simple way
to collaborate on it.  For example, stirred up a bit by this thread,
I started having a go at some of the wiki "ToDo" list, specifically
the gb.desktop component.  I had added some descriptive and example
content for much of the DesktopFile class then hit this snag

What is the "Size" parameter in GetIcon(Size As Integer)?

Where is a convenient place to talk about that question? I don't
think it really belongs in the mailing list as it may take a
reasonable time before someone with that knowledge notices the post
and answers it. In the mean time the post just drifts farther and
farther down the time line.  I don't think that adding content to the
page concerned would work either, as the person with the knowledge is
not likely to be referring to the page in the course of their normal
day.

And while I'm at it - how do you add an image to a wiki page? Like
the http://gambaswiki.org/wiki/howto/makereport/arrange.png?  in the
"How to to make a report with Gambas" page.  Note, I mean how do I
upload the .png files I want to put in a page, not how to reference
it in the markup ( i.e. I know "[doc/myhowto/blah.png]" ).

cheers b



Images are wiki pages whose URL ends with ".png" or ".jpg".

To upload an image, you have to login and then access the page. You will
get then a button to upload the image.

Regards,

--
Benoît Minisini

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user