[scilab-Users] Problems with loading functions from toolbox

Kirill Kirillov kirill.kirillov at gmail.com
Sun Jun 14 15:26:49 CEST 2009


Hi!

В Вск, 14/06/2009 в 08:49 +0200, Yann Collette пишет:
> > Please, help to solve the following problem:
> > I've file ptp.sci in my heat_flow_inspector toolbox with four functions:
> > getPTP, getBlocks, getGU1type and getGU2type.
> > After I built toolbox, I got ptp.bin file and name "ptp" in "names"
> > file.
> > When I load toolbox I get library heat_flow_inspectorlib, which has ptp
> > macros, but all my functions are not available in this macros.
> > If I type and execute "ptp", then I'll get error about unknown variable
> > "ptp" and all my functions will be available.
> >
> > So the problem is how to make all functions in *.bin available just
> > after toolbox loading.
> >
> > Any help will be very appreciated, I can't solve it myself, sorry.
> >
> >   
> You can try 2 things:
> - rename your .sci file into .sce (I have not tested this solution)
.sce files aren't built by build.sce script and they aren't loaded on
toolbox start. So this way is even worse.

> - use the following rule: one function per file
I thought about this way too, but since Scilab has feature to support
many functions in one file and it loads them fine using "getf" function.
I think there should be a way to achieve the same behaviour for
libraries, otherwise it's very bad example of inconsistency in Scilab
and at least it should be documented in wiki page about toolbox
creation.

I don't want to populate files and brake logical structure (I have 7
files, each with about 5 functions). I think that I refuse using
build.sce and just change loader.sce to use "getf" function.

Thank you for your replay.

-- 
Kirill Kirillov
<><




More information about the users mailing list