[Gambas-user] Re; Developing components ...

Benoit Minisini gambas at ...1...
Mon Oct 1 20:32:57 CEST 2007


On lundi 01 octobre 2007, Gareth Bult wrote:
> Hi,
>
> I just spent the best part of the afternoon trying to track down random;
>
> Cannot open file.
> Component missing
> FForm . CreateControl .1055
>
> When trying to write and install a new component.
>
> I don't really understand how the module loader works, but there's
> something really confusing going on somewhere.
>
> I'm working on gb.db.form and I have a copy in a local folder.
> After recompiling my component and making an exec, I do;
>
> cp gb.db.form.gambas /usr/lib/gambas2/
> cp .component /usr/lib/gambas2/gb.db.form.component
> gbi2 gb.db.form
>
> Then reload Gambas and test.
> This does *not* reload my new component code! (or at least it doesn't
> *most* of the time!)
>
> What I've now done is to remove gb.db.form.* from /usr/lib/gambas2 and I've
> told gambas to install the component in my user's component folder. Which
> installs two symlinks into .local/lib/gambas2.
>
> If I do this;
> a. Change code
> b. Compile
> c. Make exec
> d. Project -> Properties
> e. Unselect gb.db.form
> f. Ok
> g. Project -> Properties
> h. Select gb.db.form
> i. OK
> .. I do NOT get the new component loaded. (100%)
>
> If I do this;
> a. Change code
> b. Compile
> c. Make exec
> d. Project -> Properties
> e. Unselect gb.db.form
> f. Ok
> g. ** Compile All **
> h. Project -> Properties
> i. Select gb.db.form
> j. OK
> .. I DO get the new component loaded. (100%)
>
> This is fairly painful (!)
>
> Is there any chance we can have the IDE automatically reload
> user-components on recompilation ???
>
> Gareth.

Please give more details: 

After having copying things into /usr/lib/gambas2 and run gbi2 (as root I 
imagine), what do you mean by "reload Gambas and test" ?

What do you mean by "I do/do not get the component loaded" ?

There is a design bug in the IDE at the moment: it caches all component 
information, and the cache is never flushed. So if a component is modified in 
the background, the component information is not refreshed, and so you do not 
see any new symbol or controls defined in the new component. You have to 
close the IDE and open it again.

Another point: you can debug your component without having to install it: just 
create a startup form or module in it, and use it for debugging.

Regards,

-- 
Benoit Minisini




More information about the User mailing list