#### scicos : MACROS ####
MACROSDIRSEXT= macros/scicos_auto \
-macros/scicos_menus \
macros/scicos_scicos \
macros/scicos_utils
#### scicos : MACROS ####
@XCOS_TRUE@MACROSDIRSEXT = macros/scicos_auto \
-@XCOS_TRUE@macros/scicos_menus \
@XCOS_TRUE@macros/scicos_scicos \
@XCOS_TRUE@macros/scicos_utils
lines(0);
CurrentDirScicos = get_absolute_file_path("buildmacros.sce");
-macrosdirs = ["scicos_auto","scicos_utils","scicos_scicos","scicos_menus"];
+macrosdirs = ["scicos_auto","scicos_utils","scicos_scicos"];
for i=1:size(macrosdirs,"*") do
exec(CurrentDirScicos+"/"+macrosdirs(i)+"/buildmacros.sce");
//** This function can be (ab)used from the Scilab command line and
//** inside a Scicos "context". In order to handle the different situations,
//** the required library are loaded if not already present in the
-//** "semiglobal-local-environment".
-
-if ~isdef('scicos_menuslib') then
- load('SCI/modules/scicos/macros/scicos_menus/lib')
-end
+//** "semiglobal-local-environment".
if exists('scicos_scicoslib')==0 then
load("SCI/modules/scicos/macros/scicos_scicos/lib") ;
end
// Define Scicos data tables ===========================================
-if ( ~isdef("scicos_pal") | ~isdef("%scicos_menu") | ..
- ~isdef("%scicos_short") | ~isdef("%scicos_help") | ..
- ~isdef("%scicos_display_mode") | ~isdef("modelica_libs") | ..
+if ( ~isdef("modelica_libs") | ..
~isdef("scicos_pal_libs") ) then
- [scicos_pal, %scicos_menu, %scicos_short, modelica_libs, scicos_pal_libs,...
- %scicos_lhb_list, %CmenuTypeOneVector, %scicos_gif,%scicos_contrib, ..
- %scicos_libs, %scicos_with_grid, %scs_wgrid] = initial_scicos_tables();
+ [modelica_libs, scicos_pal_libs, %scicos_with_grid, %scs_wgrid] = initial_scicos_tables();
end
// =====================================================================
[lhs, rhs] = argn(0);
//** load the scicos function libraries
//------------------------------------
- if exists('scicos_menuslib')==0 then
- load("SCI/modules/scicos/macros/scicos_menus/lib") ;
- end
if exists('scicos_scicoslib')==0 then
load("SCI/modules/scicos/macros/scicos_scicos/lib") ;
load("SCI/modules/scicos/macros/scicos_utils/lib") ;
end
- //** Define Scicos data tables
- //----------------------------
- if ( ~isdef("scicos_pal") | ~isdef("%scicos_menu") | ..
- ~isdef("%scicos_short") | ~isdef("%scicos_help") | ..
- ~isdef("%scicos_display_mode") | ~isdef("modelica_libs") | ..
- ~isdef("scicos_pal_libs") ) then
- [scicos_pal, %scicos_menu, %scicos_short, modelica_libs, scicos_pal_libs,...
- %scicos_lhb_list, %CmenuTypeOneVector, %scicos_gif,%scicos_contrib, ..
- %scicos_libs, %scicos_with_grid, %scs_wgrid] = initial_scicos_tables();
- end
+// Define Scicos data tables ===========================================
+if ( ~isdef("modelica_libs") | ..
+ ~isdef("scicos_pal_libs") ) then
+ [modelica_libs, scicos_pal_libs, %scicos_with_grid, %scs_wgrid] = initial_scicos_tables();
+end
// =====================================================================
//** initialize a "scicos_debug_gr" variable
//** the required library are loaded if not already present in the
//** "semiglobal-local-environment".
-if ~isdef('scicos_menuslib') then
- load('SCI/modules/scicos/macros/scicos_menus/lib')
-end
-
if exists('scicos_scicoslib')==0 then
load("SCI/modules/scicos/macros/scicos_scicos/lib") ;
end
end
// Define Scicos data tables ===========================================
-if ( ~isdef("scicos_pal") | ~isdef("%scicos_menu") | ..
- ~isdef("%scicos_short") | ~isdef("%scicos_help") | ..
- ~isdef("%scicos_display_mode") | ~isdef("modelica_libs") | ..
+if ( ~isdef("modelica_libs") | ..
~isdef("scicos_pal_libs") ) then
- [scicos_pal, %scicos_menu, %scicos_short, modelica_libs, scicos_pal_libs,...
- %scicos_lhb_list, %CmenuTypeOneVector, %scicos_gif,%scicos_contrib, ..
- %scicos_libs, %scicos_with_grid, %scs_wgrid] = initial_scicos_tables();
+ [modelica_libs, scicos_pal_libs, %scicos_with_grid, %scs_wgrid] = initial_scicos_tables();
end
// =====================================================================
+++ /dev/null
-
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2007-2008 - INRIA - Allan CORNET <allan.cornet@inria.fr>
-//
-// This file must be used under the terms of the CeCILL.
-// This source file is licensed as described in the file COPYING, which
-// you should have received as part of this distribution. The terms
-// are also available at
-// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
-
-if (isdef('genlib') == %f) then
- exec(SCI+'/modules/functions/scripts/buildmacros/loadgenlib.sce');
-end
-//------------------------------------
-genlib('scicos_menuslib','SCI/modules/scicos/macros/scicos_menus',%f,%t);
-//------------------------------------
function loadpallibs()
//to be called by exec(loadpallibs)
if ~(exists('scicos_pal_libs')) then
- // this is for make tests
- [scicos_pal, %scicos_menu, %scicos_short, %scicos_help, ..
- modelica_libs,scicos_pal_libs,..
- %scicos_gif,%scicos_contrib ] = initial_scicos_tables();
+ [modelica_libs, scicos_pal_libs, %scicos_with_grid, %scs_wgrid] = initial_scicos_tables();
end
for d = scicos_pal_libs
execstr(['if exists(''scs'+convstr(d)+'lib'')==0 then'
+++ /dev/null
-// Scicos
-//
-// Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-//
-// See the file ../license.txt
-//
-
-function [scs_m,atomicflg]=xml2cos(xmlfilename,typ)
- atomicflg=%f;
- [lhs,rhs]=argn(0)
- if exists('scicos_scicoslib')==0 then load("SCI/modules/scicos/macros/scicos_scicos/lib") ;,end
- exec(loadpallibs,-1) //to load the palettes libraries
- if rhs<2 then
- typ=[];
- global txtline
- txtline=1
- flag=%f;
- txt=mgetl(xmlfilename)
- end
- while and(typ<>'</Diagram>') do
- if typ(1)=='<Diagram' then
- scs_m=scicos_diagram();
- elseif typ(1)=='<ScicosVersion' then
- ttyp=tokens(typ(2),'""')
- if size(ttyp,'*')<2 then
- scs_m.version="scicos4.3"
- else
- scs_m.version=ttyp(2);
- end
- elseif typ(1)=='<AtomicDiagram' then
- ttyp=tokens(typ(2),'""');
- if ttyp(2)=='yes' then atomicflg=%t; else atomicflg=%f;end
- elseif typ(1)=='<Parameters>' then
- scs_m.props=scicos_params();
- t=read_new_line(txt);
- typ=tokens(t);
- while typ(1)<>'</Parameters>' do
- ttyp=tokens(typ(2),'''')
- //disp(ttyp(2));
- if ttyp(2)=='context' then
- t=read_new_line(txt);
- cntxt=cos_subst(t);
- scs_m.props.context=evstr(cntxt);
- elseif ttyp(2)=='options' then
- scs_m=load_par('</params>','options','props')
- else
- indx1=strindex(t,'value=''');indx1=indx1+6;
- indx2=length(t)-4;
- tttyp=strsplit(t,[indx1,indx2]);
- execstr('scs_m.props.'+ttyp(2)+'='+tttyp(2))
- end
- t=read_new_line(txt);
- typ=tokens(t);
- if typ(1)=='</params>' then
- t=read_new_line(txt);
- typ=tokens(t);
- end
- end
- elseif typ(1)=='<Objects>' then
- t=read_new_line(txt);
- typ=tokens(t);
- while typ(1)<>'</Objects>' do
- if typ(1)=='<Block' then
- scs_m=treat_blocks('</Block>',typ)
- elseif typ(1)=='<Text' then
- scs_m=treat_blocks('</Text>',typ)
- elseif typ(1)=='<Link' then
- numb=get_numb(typ);
- execstr('scs_m.objs('+numb+')=scicos_link()');
- t=read_new_line(txt);
- typ=tokens(t);
- while typ(1)<>'</Link>' do
- ttyp=tokens(typ(2),'''')
- indx1=strindex(t,'value=''');indx1=indx1+6;
- indx2=length(t)-4;
- tttyp=strsplit(t,[indx1,indx2]);
- execstr('scs_m.objs('+numb+').'+ttyp(2)+'='+tttyp(2));
- t=read_new_line(txt);
- typ=tokens(t);
- end
- elseif typ(1)=='<Deleted' then
- numb=get_numb(typ);
- execstr('scs_m.objs('+numb+')=mlist(''Deleted'')');
- end
- t=read_new_line(txt);
- typ=tokens(t);
- end
- end
- t=read_new_line(txt);
- typ=tokens(t);
- end
- if rhs<2 then
- clearglobal txtline;
- end
-endfunction
-
-function field=cos_subst(field)
- field=strsubst(field,'&','&');
- field=strsubst(field,'<','<');
- field=strsubst(field,'>','>');
- field=strsubst(field,'"','""');
- field=strsubst(field,''','''');
- field=strsubst(field,'<p>','');
- field=strsubst(field,'</p>','');
-endfunction
-
-function scs_m=load_par(symbol,id1,id2)
- scs_m=scs_m;global txtline
- t=read_new_line(txt);
- typ=tokens(t);
- while typ(1)<>symbol do
- //disp(typ(1))
- if typ(1)=='<Diagram' then
- //disp('here')
- [scs_m1,atomicflg]=xml2cos(xmlfilename,typ)
- execstr('scs_m.'+id2+'.model.rpar=scs_m1');
- if atomicflg then execstr('scs_m.'+id2+'.model.sim=list(""asuper"",2004)');end
- t=read_new_line(txt);
- typ=tokens(t);
- else
- ttyp=tokens(typ(2),'''')
- //disp(ttyp(2));
- if ttyp(2)=='rpar' & size(typ,'*')==2 then // is kept for compatibility
- if symbol=='</Block>' then
- scs_m1=xml2cos(xmlfilename,typ)
- execstr('scs_m.'+id2+'.'+id1+'('''+ttyp(2)+''')='+sci2exp(scs_m1,0));
- else
- t=read_new_line(txt);
- execstr('scs_m.'+id2+'.'+id1+'('''+ttyp(2)+''')='+cos_subst(t));
- end
- elseif ttyp(2)=='gr_i' then
- t=read_new_line(txt);
- execstr('scs_m.'+id2+'.'+id1+'('''+ttyp(2)+''')='+cos_subst(t));
- elseif ttyp(2)=='exprs' then
- exprstxt=[];
- t=read_new_line(txt);
- typ=tokens(t);
- indx_end=grep(txt,'</graphics>');
- ind=find(indx_end>txtline);ind=ind(1);
- indx_end=indx_end(ind);
- exprstxt=cos_subst(txt(txtline:indx_end-1))
- txtline=indx_end;
- if size(exprstxt,'*')>1 then
- unit=file('open',TMPDIR+'/exprstxt.sce','unknown');
- exprstxt=['scs_m.'+id2+'.'+id1+'('''+ttyp(2)+''')=..';exprstxt]
- write(unit,exprstxt);
- file('close',unit);
- execstr('exec(""'+TMPDIR+'/exprstxt.sce"",-1);');
- else
- execstr('scs_m.'+id2+'.'+id1+'('''+ttyp(2)+''')='+exprstxt);
- end
- else
- indx1=strindex(t,'value=''');indx1=indx1+6;
- indx2=length(t)-4;
- tttyp=strsplit(t,[indx1,indx2]);
- //tttyp=tokens(typ(3),'''')
- //disp(tttyp(2));
- execstr('scs_m.'+id2+'.'+id1+'('''+ttyp(2)+''')='+cos_subst(tttyp(2)))
- end
- t=read_new_line(txt);
- typ=tokens(t);
- if or(typ==['</graphics>','</model>']) then
- t=read_new_line(txt);
- typ=tokens(t);
- end
- end
- end
-endfunction
-
-function numb=get_numb(typ)
- ttyp=tokens(typ(2),'''')
- ttyp=tokens(ttyp(1),'""')
- //disp(ttyp(2))
- //numb=strsplit(ttyp(2),[1:length(ttyp(2))-1])
- ind=strindex(ttyp(2),'_');
- //ind=grep(numb,'_')
- if ind==[] then
- numb=strsplit(ttyp(2),3);
- else
- numb=strsplit(ttyp(2),ind($));
- end
- numb=numb(2);
-endfunction
-
-function scs_m=treat_blocks(symbol,typ)
- scs_m=scs_m;global txtline
- numb=get_numb(typ);
- if symbol=='</Block>' then
- execstr('scs_m.objs('+numb+')=scicos_block();');
- else
- execstr('scs_m.objs('+numb+')=scicos_text();');
- end
- t=read_new_line(txt);
- typ=tokens(t);
- while typ(1)<>symbol do
- ttyp=tokens(typ(2),'''')
- //disp(ttyp(2))
- //disp(symbol)
- if or(ttyp(2)==['graphics','model','diagram']) then
- //if ttyp(2)=='diagram' then pause;end
- scs_m=load_par(symbol,ttyp(2),'objs('+numb+')');
- //elseif ttyp(2)=='void' then
- else
- //aboif ttyp(2)=='gui' then pause;end
- indx1=strindex(t,'value=''');indx1=indx1+6;
- indx2=length(t)-4;
- tttyp=strsplit(t,[indx1,indx2]);
- //tttyp=tokens(typ(3),'''')
- execstr('scs_m.objs('+numb+').'+ttyp(2)+'='+cos_subst(tttyp(2)))
- end
- t=read_new_line(txt);
- typ=tokens(t);
- end
-endfunction
-
-function blk=scicos_text(v1,v2,v3,v4,v5)
-// Copyright INRIA
-//Block data structure initialization
- if exists('graphics','local')==0 then graphics=scicos_graphics(),end
- if exists('model','local')==0 then model=scicos_model(),end
- if exists('void','local')==0 then void='',end
- if exists('gui','local')==0 then gui='',end
-
- blk=mlist(['Text','graphics','model','void','gui'],graphics,model,void,gui)
-endfunction
-
-function t=read_new_line(txt)
-global txtline
-txtline=txtline+1;
-t=txt(txtline)
-endfunction
-
-function [scicos_pal, %scicos_menu, %scicos_short, modelica_path, scicos_pal_libs, %scicos_lhb_list, %CmenuTypeOneVector, %scicos_gif, %scicos_contrib, %scicos_libs, %scicos_with_grid, %scs_wgrid]=initial_scicos_tables()
+
+function [modelica_path, scicos_pal_libs, %scicos_with_grid, %scs_wgrid]=initial_scicos_tables()
//** This function is called from "scicos" "scicos_simulate" "lincos" "steadycos"
%scicos_with_grid = %f;//** define grid
%scs_wgrid = [10;10;12];//**define aspect of grid
-
- //Scicos palettes names ============================================================
- pal_names = ['Sources';'Sinks';'Events';'Branching';
- 'Linear';'Non_linear';'Matrix';'Integer';
- 'Modelica';'Lookup_Tables';'Threshold';'Others';
- 'DemoBlocks';'OldBlocks'];
- scicos_pal = [pal_names,'SCI/modules/scicos/palettes/' + pal_names + '.cosf']
-
- //Scicos block icons location ====================================================
- %scicos_gif = SCI + '/modules/scicos/help/scicos_doc/man/gif_icons/';
-
- //Scicos contribs ====================================================
- %scicos_contrib = [];
-
- %scicos_libs = [];
+
//Scicos palettes libs list ========================================================
-
-
scicos_pal_libs = ['Branching','Events','Misc','Sinks','Threshold','Linear','MatrixOp','NonLinear','Sources','Electrical','Hydraulics','PDE','IntegerOp'];
- //Scicos Menu definitions==========================================================
- [%scicos_menu,%scicos_lhb_list,%scicos_short,%CmenuTypeOneVector] = set_initial_xcos_menus()
-
//Scicos Modelica librabry path definitions========================================
modelica_path = getModelicaPath();
//** This is the END, the END my friend". By The Doors, Apocalypse Now.
endfunction
+
// =============================================================================
load('SCI/modules/scicos/macros/scicos_scicos/lib');
load('SCI/modules/scicos/macros/scicos_utils/lib');
-load('SCI/modules/scicos/macros/scicos_menus/lib');
-if ( ~isdef("scicos_pal") | ~isdef("%scicos_menu") | ..
- ~isdef("%scicos_short") | ~isdef("%scicos_help") | ..
- ~isdef("%scicos_display_mode") | ~isdef("modelica_libs") | ..
- ~isdef("scicos_pal_libs") ) then
- [scicos_pal, %scicos_menu, %scicos_short, modelica_libs, scicos_pal_libs,...
- %scicos_lhb_list, %CmenuTypeOneVector, %scicos_gif,%scicos_contrib, ..
- %scicos_libs, %scicos_with_grid, %scs_wgrid] = initial_scicos_tables();
+if ( ~isdef("modelica_libs") | ..
+ ~isdef("scicos_pal_libs") ) then
+ [modelica_libs, scicos_pal_libs, %scicos_with_grid, %scs_wgrid]=initial_scicos_tables()
+ %scs_wgrid =
+
+ 10.
+ 10.
+ 12.
+ %scicos_with_grid =
+
+ F
+ scicos_pal_libs =
+
+
+ column 1 to 7
+
+!Branching Events Misc Sinks Threshold Linear MatrixOp !
+
+ column 8 to 13
+
+!NonLinear Sources Electrical Hydraulics PDE IntegerOp !
+ modelica_libs =
+
+
+ column 1
+
+!SCI/modules/scicos_blocks/macros/Electrical !
+
+ column 2
+
+!SCI/modules/scicos_blocks/macros/Hydraulics !
end
exec(loadpallibs,-1)
exec('SCI/modules/scicos/tests/unit_tests/scicos_tests.sci');
// - Alan Layec <alan.layec@inria.fr>
+// Copyright (C) 2010 - DIGITEO - Clément DAVID <clement.david@scilab.org>
+
//
// This program is free software; you can redistribute it and/or modify
function [%ok,%1,%2,%3,%4,%5,...
%6,%7,%8,%9,%10,...
%11,%12,%13,%14,%15,...
- %16,%17,%18,%19,%20]=setvalue(%desc,%lables,%typ,%ini)
+ %16,%17,%18,%19,%20,...
+ %21,%22,%23,%24,%25,...
+ %26,%27,%28,%29,%30]=setvalue(%desc,%lables,%typ,%ini)
// To avoid infinite loops in set section of blocks during eval
if %scicos_prob==%t then
%ok=%f
[%1,%2,%3,%4,%5,...
%6,%7,%8,%9,%10,...
%11,%12,%13,%14,%15,...
- %16,%17,%18,%19,%20]=(0,0,0,0,...
- 0,0,0,0,0,0,...
+ %16,%17,%18,%19,%20,...
+ %21,%22,%23,%24,%25,...
+ %26,%27,%28,%29,%30]=(0,0,0,0,0,...
+ 0,0,0,0,0,...
+ 0,0,0,0,0,...
+ 0,0,0,0,0,...
0,0,0,0,0,...
0,0,0,0,0)
return;end
%6=[];%7=[];%8=[];%9=[];%10=[];
%11=[];%12=[];%13=[];%14=[],%15=[];
%16=[];%17=[];%18=[];%19=[],%20=[];
+%21=[];%22=[];%23=[];%24=[],%25=[];
+%26=[];%27=[];%28=[];%29=[],%30=[];
if %rhs==3 then %ini=emptystr(%nn,1),end
%ok=%t
while %t do
for %kk=1:%nn
%vv=%vv_list(%kk)
%ierr=%ierr_vec(%kk)
- select part(%typ(2*%kk-1),1:3)
- case 'mat'
+ select part(%typ(2*%kk-1),1:6)
+ case 'mat '
if %ierr<>0 then
%noooo=-%kk,break,
end
if %sz(1)>=0 then if %mmmm<>%sz(1) then %noooo=%kk,break,end,end
if %sz(2)>=0 then if %nnnnn<>%sz(2) then %noooo=%kk,break,end,end
end
- case 'vec'
+ case 'vec '
if %ierr<>0 then
%noooo=-%kk,break,
end
%ssss=string(%sz(1))
%nnnnn=prod(size(%vv))
if %sz(1)>=0 then if %nnnnn<>%sz(1) then %noooo=%kk,break,end,end
- case 'pol'
+ case 'intvec'
+ if %ierr<>0 then
+ %noooo=-%kk,break,
+ end
+ //the type of %vv is accepted if it is constant or integer
+ if and(type(%vv)<>[1 8]) then %nok=-%kk,break,end
+ %sz=%typ(2*%kk);if type(%sz)==10 then %sz=evstr(%sz),end
+ %ssss=string(%sz(1))
+ %nnnnn=prod(size(%vv))
+ if %sz(1)>=0 then if %nnnnn<>%sz(1) then %noooo=%kk,break,end,end
+ case 'pol '
if %ierr<>0 then
%noooo=-%kk,break,
end
%ssss=string(%sz(1))
%nnnnn=prod(size(%vv))
if %sz(1)>=0 then if %nnnnn<>%sz(1) then %noooo=%kk,break,end,end
- case 'row'
+ case 'row '
if %ierr<>0 then
%noooo=-%kk,break,
end
[%mmmm,%nnnnn]=size(%vv)
if %mmmm<>1 then %noooo=%kk,break,end,
if %sz(1)>=0 then if %nnnnn<>%sz(1) then %noooo=%kk,break,end,end
- case 'col'
+ case 'col '
if %ierr<>0 then
%noooo=-%kk,break,
end
[%mmmm,%nnnnn]=size(%vv)
if %nnnnn<>1 then %noooo=%kk,break,end,
if %sz(1)>=0 then if %nnnnn<>%sz(1) then %noooo=%kk,break,end,end
- case 'str'
+ case 'str '
clear %vv
%vv=%str(%kk)
if type(%vv)<>10 then %noooo=-%kk,break,end
%ssss=string(%sz(1))
%nnnnn=prod(size(%vv))
if %sz(1)>=0 then if %nnnnn<>1 then %noooo=%kk,break,end,end
- case 'lis'
+ case 'lis '
if %ierr<>0 then
%noooo=-%kk,break,
end
%ssss=string(%sz(1))
%nnnnn=size(%vv)
if %sz(1)>=0 then if %nnnnn<>%sz(1) then %noooo=%kk,break,end,end
- case 'r '
+ case 'r '
if %ierr<>0 then
%noooo=-%kk,break,
end
if %sz(1)>=0 then if %mmmm<>%sz(1) then %noooo=%kk,break,end,end
if %sz(2)>=0 then if %nnnnn<>%sz(2) then %noooo=%kk,break,end,end
end
- case 'gen'
+ case 'gen '
//accept all
else
- error('Incorrect type :'+%typ(2*%kk-1))
+ str = gettext("%s: Type %s is not implemented.\n");
+ mess = msprintf(str, 'setvalue', %typ(2*%kk-1));
+ warnBlockByUID(arg1.doc(1), mess); // arg1 is from the block interface function
+ error(mess);
end
execstr('%'+string(%kk)+'=%vv')
clear %vv
end
- if %noooo>0 then
- messagebox(['answer given for '+%lables(%noooo);
- 'has invalid dimension: ';
- 'waiting for dimension '+%ssss],'modal')
+ if %noooo>0 then
+ str = gettext("%s: invalid dimension for ''%s'', waiting for %s");
+ mess = msprintf(str, 'setvalue', %lables(%noooo), %ssss);
+ warnBlockByUID(arg1.doc(1), mess); // arg1 is from the block interface function
%ini=%str
%ok=%f;break
elseif %noooo<0 then
- messagebox(['answer given for '+%lables(-%noooo);
- 'has incorrect type :'+ %typ(-2*%noooo-1)],'modal')
+ str = gettext("%s: incorrect type for ''%s'', getting %s");
+ mess = msprintf(str, 'setvalue', %lables(-%noooo), %typ(-2*%noooo-1));
+ warnBlockByUID(arg1.doc(1), mess); // arg1 is from the block interface function
%ini=%str
%ok=%f;break
else
load('SCI/modules/scicos/macros/scicos_scicos/lib');
load('SCI/modules/scicos/macros/scicos_utils/lib');
-load('SCI/modules/scicos/macros/scicos_menus/lib');
-if ( ~isdef("scicos_pal") | ~isdef("%scicos_menu") | ..
- ~isdef("%scicos_short") | ~isdef("%scicos_help") | ..
- ~isdef("%scicos_display_mode") | ~isdef("modelica_libs") | ..
- ~isdef("scicos_pal_libs") ) then
+if ( ~isdef("modelica_libs") | ..
+ ~isdef("scicos_pal_libs") ) then
- [scicos_pal, %scicos_menu, %scicos_short, modelica_libs, scicos_pal_libs,...
- %scicos_lhb_list, %CmenuTypeOneVector, %scicos_gif,%scicos_contrib, ..
- %scicos_libs, %scicos_with_grid, %scs_wgrid] = initial_scicos_tables();
+ [modelica_libs, scicos_pal_libs, %scicos_with_grid, %scs_wgrid]=initial_scicos_tables()
end
exec(loadpallibs,-1)
end
clear theLib;
- if isfile('SCI/modules/scicos/macros/scicos_menus/lib') then
- load('SCI/modules/scicos/macros/scicos_menus/lib');
- listlibsname = [listlibsname, 'scicos_menus'];
- end
-
if isfile('SCI/modules/scicos/macros/scicos_scicos/lib') then
load('SCI/modules/scicos/macros/scicos_scicos/lib');
listlibsname = [listlibsname, 'scicos_scicos'];