[Gambas-user] Project templates

adamnt42 at ...626... adamnt42 at ...626...
Sat Sep 26 03:49:00 CEST 2015


On Fri, 25 Sep 2015 12:36:16 +0200
Tobias Boege <taboege at ...626...> wrote:

> On Fri, 25 Sep 2015, adamnt42 at ...626... wrote:
> > > Project templates are just normal projects that are stored:
> > > 
> > > - In '/usr/share/gambas3/template' : they are the default templates 
> > > provided with the Gambas sources. (Don't forget to issue a ./reconf && 
> > > ./configure -C if you compile from /trunk).
> > 
> > So, I presume that I cannot "localize" the default templates as they will be replaced on a new make install?
> > 
> 
> That's a point. I haven't checked out templates yet but maybe it would be
> easy to make user templates override default templates like classes do in
> the interpreter's global symbol table: if a user template has the same name
> as a default template, the user files override the default...
> 
> I'd guess it suffices to do the overriding on a file basis. By using a
> Collection indexed with relative paths of the files, this should be really
> easy. If we do this, we would also have the gears ready to implement
> template dependencies / inheritance.
> 
> OTOH, would it bother you so much to prefix your user templates with "PH" or
> something? :-)

Yep, will probably do that. I will do some more checking to see if this is optimal.

> 
> > > 
> > > - In '~/.local/share/gambas3/template' : they are templates defined by 
> > > the user. To define a custom template, just save a project there.
> > 
> > Ah, yes but..
> > There are more than one of us here. Custom templates would suit us better if they were stored in a shared directory. Is there any chance of this in the (near) future? If not I will see if I can hack our local IDE to suit.
> > 
> 
> Before you hack, you could maybe solve your problem by symlinking all your
> template directories to some globally accessible location?

I realised that after I posted but then we would lose all the advantages provided by the IDE and have to "manage" the shared templates manually.  

> 
> Regards,
> Tobi
> 
> -- 
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk


So true....   :-)

regards
bruce

-- 
B Bruen <adamnt42 at ...3379... (sort of)>




More information about the User mailing list