[Gambas-user] Using an existing component to create a new version

Charlie Reinl Karl.Reinl at ...2345...
Fri Jan 22 15:05:28 CET 2010


Am Freitag, den 22.01.2010, 09:54 +0100 schrieb Rolf-Werner Eilert:
> Am 21.01.2010 23:01, schrieb Charlie Reinl:
> > Am Donnerstag, den 21.01.2010, 18:19 +0100 schrieb Rolf-Werner Eilert:
> >> The balloon component was easy to change and make install. But when I
> >> update to another version of Gambas, I will have to make the changes again.
> >>
> >> So I thought it might be wiser to extract the balloon component into an
> >> own project for myself to be there for every new version.
> >>
> >> After reading the documentation, I did this:
> >>
> >> - Creating a new project within the IDE for component use named NewBalloon
> >>
> >> - Importing Balloon.class, FBalloon.class and FBalloon.form as well as
> >> the one picture needed from gb.form in the source dir.
> >>
> >> Within the IDE, Balloon runs well. Now I let it make an executable,
> >> checking "Install in the user component directory". However, I don't
> >> know where that is. Just pressed the button...
> >>
> >> No wonder when I opened another project, I couldn't find my NewBalloon
> >> in the components list :-)
> >>
> >> The documentation says: You can install the component in your home
> >> directory by checking the corresponding option in the "Make executable"
> >> dialog. Once installed there, the component will be visible in the
> >> "Components" tab of the project property dialog as any other globally
> >> installed components.
> >>
> >> But nothing is in my home directory.
> >>
> >> A bit confusion here, just let me know where to store and how. Thanks a lot!
> >>
> >> Rolf
> >>
> > Salut Rolf,
> >
> > Some words about gambas2 user-components :
> >
> > * user-components are only in the list, if they exists when starting the
> > IDE
> >
> > * user-components should be stored in the 'user component directory' ,
> > there (see below) you find links to the files
> >
> > * If your project moves, you have to delete the 4 links concerned there
> > (see below), because and bad MakeLink procedure in the IDE.
> >
> > The user component directory is :
> >
> > $~/.local/lib/gambas2 (for every component)
> >
> > /<component_Name>.component =>  $/path/to/project/.component
> >
> > /<component_Name>.gambas =>  $/path/to/executable/<component_Name>.gambas
> >
> > and
> >
> > $~/.local/share/gambas2/info (for every component)
> >
> > /<component_Name>.list =>  $/path/to/project/.list
> >
> > /<component_Name>.info =>  $/path/to/project/.info
> >
> >
> 
> Thanks a lot, Charlie, that helped!
> 
> Looking up the ./local/lib I found that the IDE had made a link to the 
> component in the project directory but instead of a NewBalloon.component 
> it had made a NewBalloon.gambas binary although I definitely had checked 
> "make component" yesterday. At least this explains why the component 
> wasn't found.
> 
> After explicitly pointing the file dialog of the IDE to ~/.local/lib, it 
> wrote a NewBalloon.component, and now the component list has two 
> sections with components, including my own. Oh how proud I am :-)
> 
> What came into my mind only now is, I'll have to rename "Balloon" into 
> somewhat different to not confuse the two versions, right? I guess 
> Gambas doesn't know overloading, does it.
> 
> Regards
> 
> Rolf

Salut Rolf,

did you extract the balloon class out of gb.form and changed it, or copy
the whole gb.form and made the balloon changes there ?

If you cloned the balloon class, what I see as the better way, it's
wiser to rename it, because you guess right! Gambas (at least gambas2)
can't overloading.
-- 
Amicalement
Charlie





More information about the User mailing list