Reorganization
Allan Cornet [Mon, 2 Oct 2006 19:29:57 +0000 (19:29 +0000)]
re enabled some demos

introduction
cacsd
signal processing
tcl/tk
scicos
graphics
gui
sound

(to finish ...)

24 files changed:
scilab/etc/scilab.start
scilab/modules/cacsd/demos/cont.dem
scilab/modules/cacsd/demos/mixed.dem
scilab/modules/cacsd/demos/pid.dem
scilab/modules/cacsd/etc/cacsd.start
scilab/modules/core/etc/core.start
scilab/modules/core/macros/add_demo.sci [moved from scilab/modules/others/macros/add_demo.sci with 100% similarity]
scilab/modules/core/macros/scilab_demos.sci [new file with mode: 0644]
scilab/modules/graphics/demos/dessin-1.dem
scilab/modules/graphics/demos/dessin.dem
scilab/modules/graphics/etc/graphics.start
scilab/modules/gui/demos/dialog.dem
scilab/modules/gui/etc/gui.start
scilab/modules/gui/src/c/wsci/wmenu.c
scilab/modules/helptools/etc/helptools.start
scilab/modules/others/macros/initial_demos_tables.sci [deleted file]
scilab/modules/randlib/demos/random.dem
scilab/modules/randlib/etc/randlib.start
scilab/modules/scicos/demos/scicos.dem
scilab/modules/scicos/etc/scicos.start
scilab/modules/signal_processing/etc/signal_processing.start
scilab/modules/sound/etc/sound.start
scilab/modules/tclsci/demos/tk/tk.dem
scilab/modules/tclsci/etc/tclsci.start

index b5f7b46..1bbcbbd 100644 (file)
@@ -69,6 +69,11 @@ if larg<>[] & larg<=size(args,"*") then
 end
 clear  larg L
 
+// Define Initial demo tables  ========================================
+// demolist is a two column matrix of strings
+global demolist
+demolist=[];
+
 // loads modules ======================================================
 modules=getmodules();
 index=size(modules);
@@ -77,7 +82,7 @@ for i=1:index(1) do
  exec("SCI/modules/"+modules(i)+"/etc/"+modules(i)+".start",-1);
 end  
 
-clear stripblanks modules index i
+clear stripblanks modules index i add_demo
 
 // Create some configuration variables ================================
 [home,SCIHOME]=sethomedirectory();
@@ -93,11 +98,7 @@ else
 end
 setenv("VERSION",getversion())
  
- // Define Initial demo tables, ========================================
-//demolist is a two column matrix of strings
-global demolist
-demolist=initial_demos_tables()
-clear initial_demos_tables demolist
+
 
 // Set the preferred browser  ==========================================
 global %browsehelp
index 10c97b6..4cf7e25 100644 (file)
@@ -1,4 +1,4 @@
-deff('[]=demoexc(fil)','exec(''SCI/demos/control/''+fil)')
+deff('[]=demoexc(fil)','exec(''SCI/modules/cacsd/demos/''+fil)')
 // Copyright INRIA
 while %t do
   n=tk_choose(['LQG','Mixed-sensitivity','PID'],'Select a demo');
index 4b1c9dc..8229c38 100644 (file)
@@ -14,7 +14,7 @@ xtitle('PLANT   and   CONTROLLER')
 mode(2)
 
 x_message(['Mixed Sensitivity Controller Design';
-           'file: '+SCI+'/demos/control/mixed.dem'])
+           'file: '+SCI+'/modules/cacsd/demos/mixed.dem'])
 mode(1)
 s=poly(0,'s');
 str='[(s-1)/((s-1)^2*(s+2))]';
index 460b1b1..bb46607 100644 (file)
@@ -15,7 +15,7 @@ mode(2)
 
 s=poly(0,'s');z=poly(0,'z');
 x_message(['Example of PID Design '
-          'file: '+SCI+'/demos/control/pid.dem'])      
+          'file: '+SCI+'/modules/cacsd/demos/pid.dem'])        
 
 n=tk_choose(['Continuous time';'Discrete time'],'Select time domain');
 select n
index ea47ff4..5b9df6b 100644 (file)
@@ -10,14 +10,17 @@ global LANGUAGE
 
 path = get_absolute_file_path('cacsd.start');
 path = getshortpathname(path);
+pathdemos = pathconvert(part(path,1:(length(path)-5))+'/demos/control.dem',%f,%f);
 
 if LANGUAGE == 'fr' then
-       path = pathconvert(part(path,1:(length(path)-5))+'/help/fr',%f,%f);
-       add_help_chapter("CACSD",path);
+       pathhelp = pathconvert(part(path,1:(length(path)-5))+'/help/fr',%f,%f);
+       add_help_chapter("CACSD",pathhelp);
+       add_demo("CACSD",pathdemos);
 elseif LANGUAGE == 'eng' then
-       path = pathconvert(part(path,1:(length(path)-5))+'/help/eng',%f,%f);
+       pathhelp = pathconvert(part(path,1:(length(path)-5))+'/help/eng',%f,%f);
        add_help_chapter("CACSD",path);
+       add_demo("CACSD",pathdemos);
 end
 
-clear path get_absolute_file_path add_help_chapter LANGUAGE;
+clear pathhelp pathdemos get_absolute_file_path add_help_chapter LANGUAGE;
 // ====================================================================
index 3d6dc24..deaf8b6 100644 (file)
@@ -10,14 +10,17 @@ global LANGUAGE
 
 path = get_absolute_file_path('core.start');
 path = getshortpathname(path);
+pathdemos = pathconvert(part(path,1:(length(path)-5))+'/demos/intro/dem01.dem',%f,%f);
 
 if LANGUAGE == 'fr' then
-       path = pathconvert(part(path,1:(length(path)-5))+'/help/fr',%f,%f);
-       add_help_chapter("Core Module",path);
+       pathhelp = pathconvert(part(path,1:(length(path)-5))+'/help/fr',%f,%f);
+       add_help_chapter("Core Module",pathhelp);
+       add_demo('Introduction',pathdemos);
 elseif LANGUAGE == 'eng' then
-       path = pathconvert(part(path,1:(length(path)-5))+'/help/eng',%f,%f);
-       add_help_chapter("Core Module",path);
+       pathhelp = pathconvert(part(path,1:(length(path)-5))+'/help/eng',%f,%f);
+       add_help_chapter("Core Module",pathhelp);
+       add_demo('Introduction',pathdemos);
 end
 
-clear path get_absolute_file_path add_help_chapter LANGUAGE;
+clear pathhelp pathdemos get_absolute_file_path add_help_chapter LANGUAGE;
 // ====================================================================
diff --git a/scilab/modules/core/macros/scilab_demos.sci b/scilab/modules/core/macros/scilab_demos.sci
new file mode 100644 (file)
index 0000000..3d5ade8
--- /dev/null
@@ -0,0 +1,23 @@
+// CORNET Allan \r
+// INRIA 2006\r
+\r
+function scilab_demos()\r
+\r
+mode(-1)\r
+\r
+oldln=lines();\r
+lines(0)\r
+global demolist\r
+// Demos list is defined in scilab.start\r
+deff('[]=demoex(num)','exec(demolist(num,2),-1)')\r
+while %t then\r
+  num=tk_choose(demolist(:,1),['Click to choose a demo']);\r
+  if num==0 then \r
+     lines(oldln(1))\r
+     return\r
+  else\r
+     demoex(num)\r
+  end,\r
+end\r
+\r
+endfunction
\ No newline at end of file
index 7744aca..339a3c5 100644 (file)
@@ -145,13 +145,13 @@ str_l(26)=['t=%pi*(-10:10)/10;';
           'title=[''plot3d and contour''];';
           'xtitle(title,'' '','' '');'];
          
-str_l(27)=['exec(''SCI/demos/graphics/sd.sav'');';
+str_l(27)=['exec(''SCI/modules/graphics/demos/sd.sav'');';
           'set figure_style old';
           'plot2d();gr_menu(sd_1,1,1);';
           'title=[''plot2d and gr_menu''];';
           'xtitle(title,'' '','' '');'];
 
-str_l(28)=['exec(''SCI/demos/graphics/sd.sav'');';
+str_l(28)=['exec(''SCI/modules/graphics/demos/sd.sav'');';
           'set figure_style old';
           'plot3d();gr_menu(sd_2,1,1);';
           'title=[''plot3d and gr_menu''];';
index 62d4de9..c042f75 100644 (file)
@@ -10,7 +10,7 @@ function xdemo(info,str)
        execstr(str);
 endfunction
 
-exec('SCI/demos/graphics/dessin-1.dem');
+exec('SCI/modules/graphics/demos/dessin-1.dem');
 
 nn=prod(size(str_l));
 
index b2b548b..cc27508 100644 (file)
@@ -10,14 +10,17 @@ global LANGUAGE
 
 path = get_absolute_file_path('graphics.start');
 path = getshortpathname(path);
+pathdemos = pathconvert(part(path,1:(length(path)-5))+'/demos/graphics.dem',%f,%f);
 
 if LANGUAGE == 'fr' then
-       path = pathconvert(part(path,1:(length(path)-5))+'/help/fr',%f,%f);
-       add_help_chapter("Bibliothèque graphique",path);
+       pathhelp = pathconvert(part(path,1:(length(path)-5))+'/help/fr',%f,%f);
+       add_help_chapter("Bibliothèque graphique",pathhelp);
+       add_demo("Bibliothèque graphique",pathdemos);
 elseif LANGUAGE == 'eng' then
-       path = pathconvert(part(path,1:(length(path)-5))+'/help/eng',%f,%f);
-       add_help_chapter("Graphics Library",path);
+       pathhelp = pathconvert(part(path,1:(length(path)-5))+'/help/eng',%f,%f);
+       add_help_chapter("Graphics Library",pathhelp);
+       add_demo("Graphics Library",pathdemos);
 end
 
-clear path get_absolute_file_path add_help_chapter LANGUAGE;
+clear pathhelp pathdemos get_absolute_file_path add_help_chapter LANGUAGE;
 // ====================================================================
index beb9a95..b4b2343 100644 (file)
@@ -22,7 +22,9 @@ x_mdialog(['here: your message';...
 ['first row';'second row';'etc...'],...
 ['value1';'value2';'value3'])
 
+if ~MSDOS then
 n=5;m=4;mat=rand(n,m);
 row='row';labelv=row(ones(1,n))+string(1:n);
 col='col';labelh=col(ones(1,m))+string(1:m);
 new=evstr(x_mdialog('Matrix to edit',labelv,labelh,string(mat)))
+end
\ No newline at end of file
index 2d83256..62f0d20 100644 (file)
@@ -10,14 +10,17 @@ global LANGUAGE
 
 path = get_absolute_file_path('gui.start');
 path = getshortpathname(path);
+pathdemos = pathconvert(part(path,1:(length(path)-5))+'/demos/dialog.dem',%f,%f);
 
 if LANGUAGE == 'fr' then
-       path = pathconvert(part(path,1:(length(path)-5))+'/help/fr',%f,%f);
-       add_help_chapter("IHM",path);
+       pathhelp = pathconvert(part(path,1:(length(path)-5))+'/help/fr',%f,%f);
+       add_help_chapter("IHM",pathhelp);
+       add_demo("IHM",pathdemos);
 elseif LANGUAGE == 'eng' then
-       path = pathconvert(part(path,1:(length(path)-5))+'/help/eng',%f,%f);
-       add_help_chapter("GUI",path);
+       pathhelp = pathconvert(part(path,1:(length(path)-5))+'/help/eng',%f,%f);
+       add_help_chapter("GUI",pathhelp);
+       add_demo("GUI",pathdemos);
 end
 
-clear path get_absolute_file_path add_help_chapter LANGUAGE;
+clear pathhelp pathdemos get_absolute_file_path add_help_chapter LANGUAGE;
 // ====================================================================
index eedc117..6acbbd3 100644 (file)
@@ -542,7 +542,7 @@ void Callback_DEMOS(void)
        LPTW lptw=GetTextWinScilab();
 
        SendCTRLandAKey(CTRLU);
-       WriteIntoScilab(lptw,"exec('SCI/demos/alldems.dem');");
+       WriteIntoScilab(lptw,"scilab_demos();");
 }
 /*-----------------------------------------------------------------------------------*/
 void Callback_WEB(void)
index 0ab1fa7..dfb7dfd 100644 (file)
@@ -14,7 +14,7 @@ load('SCI/modules/fileio/macros/get_absolute_file_path.bin');
 load('SCI/modules/fileio/macros/pathconvert.bin');
 load('SCI/modules/fileio/macros/isdir.bin');
 load('SCI/modules/string/macros/stripblanks.bin');
-
+load('SCI/modules/core/macros/add_demo.bin');
 
 path = get_absolute_file_path('helptools.start');
 path = getshortpathname(path);
diff --git a/scilab/modules/others/macros/initial_demos_tables.sci b/scilab/modules/others/macros/initial_demos_tables.sci
deleted file mode 100644 (file)
index 028e9b6..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-//================================
-//
-// Copyright INRIA 2005
-// Scilab team
-// Date : December 8th 2005
-// 
-//================================
-
-function demolist=initial_demos_tables()
-       demolist=[
-               'Introduction to SCILAB','basic/intro/dem01.dem';
-               'Graphics','graphics/graphics.dem';
-               'Simulation','simulation/simulation.dem'
-               'Control','control/control.dem'
-               'Signal Processing','signal/signal.dem';
-               'Optimization','optimization/optimization.dem';
-               'Graph & Networks','metanet/meta.dem';
-               'Random','random/random.dem';
-       ];
-       
-       if %scicos then
-               demolist = cat(1,demolist,['Scicos','scicos/scicos.dem']);
-       end
-       
-       if with_tk() then
-               demolist = cat(1,demolist,['TK/TCL demos','tk/tk.dem']);
-       end
-       
-       if with_pvm() then
-               demolist = cat(1,demolist,['Communications with PVM','pvm/pvm.dem']);
-       end
-               
-       demolist(:,2)='SCI/demos/'+demolist(:,2);
-       
-endfunction
index 8ee6ff5..70276fb 100755 (executable)
@@ -1,8 +1,8 @@
 // Copyright INRIA
 
 mode(-1)
-getf('SCI/demos/random/random.sci');
-getf('SCI/demos/random/randomT.sci');
+getf('SCI/modules/randlib/demos/random.sci');
+getf('SCI/modules/randlib/demos/randomT.sci');
 oldln=lines();lines(0)
 deff('[]=demoex(num)','execstr(demolist(num,2))')
 
index 8b8d605..ff01c80 100644 (file)
@@ -10,14 +10,17 @@ global LANGUAGE
 
 path = get_absolute_file_path('randlib.start');
 path = getshortpathname(path);
+pathdemos = pathconvert(part(path,1:(length(path)-5))+'/demos/random.dem',%f,%f);
 
 if LANGUAGE == 'fr' then
-       path = pathconvert(part(path,1:(length(path)-5))+'/help/fr',%f,%f);
-       add_help_chapter("randlib",path);
+       pathhelp = pathconvert(part(path,1:(length(path)-5))+'/help/fr',%f,%f);
+       add_help_chapter("randlib",pathhelp);
+       add_demo("randlib",pathdemos);
 elseif LANGUAGE == 'eng' then
-       path = pathconvert(part(path,1:(length(path)-5))+'/help/eng',%f,%f);
-       add_help_chapter("randlib",path);
+       pathhelp = pathconvert(part(path,1:(length(path)-5))+'/help/eng',%f,%f);
+       add_help_chapter("randlib",pathhelp);
+       add_demo("randlib",pathdemos);
 end
 
-clear path get_absolute_file_path add_help_chapter LANGUAGE;
+clear pathhelp pathdemos get_absolute_file_path add_help_chapter LANGUAGE;
 // ====================================================================
index e9e3d8c..baa6240 100644 (file)
@@ -31,61 +31,61 @@ while %t do
   if n ==0 then break,end
   select demos_name(n)
   case 'Simple Thermostat' then  
-    scicos('SCI/demos/scicos/demo1.cosf');
+    scicos('SCI/modules/scicos/demos/demo1.cosf');
   case 'Continuous Plant discrete controller' then  
-    scicos('SCI/demos/scicos/demo2.cosf');
+    scicos('SCI/modules/scicos/demos/demo2.cosf');
   case 'Simple demo' then  
-    scicos('SCI/demos/scicos/demo3.cosf');
+    scicos('SCI/modules/scicos/demos/demo3.cosf');
   case 'Bouncing ball' then  
-    scicos('SCI/demos/scicos/demo4.cosf');     
+    scicos('SCI/modules/scicos/demos/demo4.cosf');     
   case 'Table lookup example' then  
-    scicos('SCI/demos/scicos/demo5.cosf');     
+    scicos('SCI/modules/scicos/demos/demo5.cosf');     
   case 'Threshold' then  
-    scicos('SCI/demos/scicos/demo6.cosf');     
+    scicos('SCI/modules/scicos/demos/demo6.cosf');     
   case 'Scilab Block' then  
-    scicos('SCI/demos/scicos/demo7.cosf');     
+    scicos('SCI/modules/scicos/demos/demo7.cosf');     
   case 'Thermostat' then  
-    scicos('SCI/demos/scicos/Temp.cosf');      
+    scicos('SCI/modules/scicos/demos/Temp.cosf');      
   case 'Fibonacci' then  
-    scicos('SCI/demos/scicos/fibo.cosf');
+    scicos('SCI/modules/scicos/demos/fibo.cosf');
   case 'Cont.Disc-Observer.cosf' then  
-    scicos('SCI/demos/scicos/Cont.Disc-Observer.cosf');
+    scicos('SCI/modules/scicos/demos/Cont.Disc-Observer.cosf');
   case 'Controller.cosf' then  
-    scicos('SCI/demos/scicos/Controller.cosf');
+    scicos('SCI/modules/scicos/demos/Controller.cosf');
   case 'System-Observer.cosf' then  
-    scicos('SCI/demos/scicos/System-Observer.cosf');
+    scicos('SCI/modules/scicos/demos/System-Observer.cosf');
   case         'bouncing balls' then
-    scicos('SCI/demos/scicos/bounce.cosf');
+    scicos('SCI/modules/scicos/demos/bounce.cosf');
   case 'Live demo' then
-    getf('SCI/demos/scicos/scicos_play.sci','n')
-    scicos_play('SCI/demos/scicos/live.dat')
+    getf('SCI/modules/scicos/demos/scicos_play.sci','n')
+    scicos_play('SCI/modules/scicos/demos/live.dat')
   case 'sound demo' then  
-    scicos('SCI/demos/scicos/sound.cosf');
+    scicos('SCI/modules/scicos/demos/sound.cosf');
   case 'Synchro Block demo' then  
-    scicos('SCI/demos/scicos/Ifsub.cosf');
+    scicos('SCI/modules/scicos/demos/Ifsub.cosf');
   case 'Electrical circuit: RLC' then  
     if ~(haveacompiler()) then
       x_message(['Scilab doesn''t find a C compiler','This demo is disabled'])
     else
-      scicos('SCI/demos/scicos/rlc1.cosf');
+      scicos('SCI/modules/scicos/demos/rlc1.cosf');
     end
   case 'Electrical circuit: Rectifier' then  
     if ~(haveacompiler()) then
       x_message(['Scilab doesn''t find a C compiler','This demo is disabled'])
     else
-     scicos('SCI/demos/scicos/Rectifier.cosf');
+     scicos('SCI/modules/scicos/demos/Rectifier.cosf');
     end
   case 'Regulated Thermo Hydraulic plant' then  
     if ~(haveacompiler()) then
       x_message(['Scilab doesn''t find a C compiler','This demo is disabled'])
     else
-      scicos('SCI/demos/scicos/Hydraulics.cosf');
+      scicos('SCI/modules/scicos/demos/Hydraulics.cosf');
     end
    case 'PDE' then  
     if ~(haveacompiler()) then
       x_message(['Scilab doesn''t find a C compiler','This demo is disabled'])
     else
-      scicos('SCI/demos/scicos/Thermique_bloc.cosf');
+      scicos('SCI/modules/scicos/demos/Thermique_bloc.cosf');
     end
    case 'Live tutorials' then
     tuti=['Simple block construction';
@@ -106,8 +106,8 @@ while %t do
          break
        end
       end
-      str='SCI/demos/scicos/tut'+string(n)
-      getf('SCI/demos/scicos/scicos_play.sci')
+      str='SCI/modules/scicos/demos/tut'+string(n)
+      getf('SCI/modules/scicos/demos/scicos_play.sci')
       scicos_play(str)
       chdir(dirr)
     end
index 21b59ff..66ab1af 100644 (file)
@@ -11,16 +11,20 @@ global LANGUAGE
 path=get_absolute_file_path('scicos.start');
 path=getshortpathname(path);
 path=strsubst(path,'\','/');
+pathdemos = pathconvert(part(path,1:(length(path)-5))+'/demos/scicos.dem',%f,%f);
+
 if (LANGUAGE=='fr') then
-  path=strsubst(path,'/etc/','/help/fr');
-  add_help_chapter("Scicos",path);
+  pathhelp=strsubst(path,'/etc/','/help/fr');
+  add_help_chapter("Scicos",pathhelp);
+  add_demo("Scicos",pathdemos);
 end
 
 if (LANGUAGE=='eng') then
-  path=strsubst(path,'/etc/','/help/eng');
-  add_help_chapter("Scicos",path)
+  pathhelp=strsubst(path,'/etc/','/help/eng');
+  add_help_chapter("Scicos",pathhelp);
+  add_demo("Scicos",pathdemos);
 end
-clear path get_absolute_file_path add_help_chapter LANGUAGE;
+clear pathhelp pathdemos get_absolute_file_path add_help_chapter LANGUAGE;
 // Define Scicos data tables ===========================================
  clear  scicos_pal // explicitly clear %helps scicos_pal variables
  if ( ~isdef("scicos_pal") | ~isdef("%scicos_menu") | ..
index 9791a7b..e2a5e90 100644 (file)
@@ -10,14 +10,17 @@ global LANGUAGE
 
 path = get_absolute_file_path('signal_processing.start');
 path = getshortpathname(path);
+pathdemos = pathconvert(part(path,1:(length(path)-5))+'/demos/signal.dem',%f,%f);
 
 if LANGUAGE == 'fr' then
-       path = pathconvert(part(path,1:(length(path)-5))+'/help/fr',%f,%f);
-       add_help_chapter("Traitement du Signal",path);
+       pathhelp = pathconvert(part(path,1:(length(path)-5))+'/help/fr',%f,%f);
+       add_help_chapter("Traitement du Signal",pathhelp);
+       add_demo("Traitement du Signal",pathdemos);
 elseif LANGUAGE == 'eng' then
-       path = pathconvert(part(path,1:(length(path)-5))+'/help/eng',%f,%f);
-       add_help_chapter("Signal Processing",path);
+       pathhelp = pathconvert(part(path,1:(length(path)-5))+'/help/eng',%f,%f);
+       add_help_chapter("Signal Processing",pathhelp);
+       add_demo("Signal Processing",pathdemos);
 end
 
-clear path get_absolute_file_path add_help_chapter LANGUAGE;
+clear pathhelp pathdemos get_absolute_file_path add_help_chapter LANGUAGE;
 // ====================================================================
index 76214fe..184b38a 100644 (file)
@@ -10,14 +10,17 @@ global LANGUAGE
 
 path = get_absolute_file_path('sound.start');
 path = getshortpathname(path);
+pathdemos = pathconvert(part(path,1:(length(path)-5))+'/demos/sound.dem',%f,%f);
 
 if LANGUAGE == 'fr' then
-       path = pathconvert(part(path,1:(length(path)-5))+'/help/fr',%f,%f);
-       add_help_chapter("Manipulation de fichiers sons",path);
+       pathhelp = pathconvert(part(path,1:(length(path)-5))+'/help/fr',%f,%f);
+       add_help_chapter("Manipulation de fichiers sons",pathhelp);
+       add_demo('Manipulation de fichiers sons',pathdemos);
 elseif LANGUAGE == 'eng' then
-       path = pathconvert(part(path,1:(length(path)-5))+'/help/eng',%f,%f);
-       add_help_chapter("Sound file handling",path);
+       pathhelp = pathconvert(part(path,1:(length(path)-5))+'/help/eng',%f,%f);
+       add_help_chapter("Sound file handling",pathhelp);
+       add_demo('Sound file handling',pathdemos);
 end
 
-clear path get_absolute_file_path add_help_chapter LANGUAGE;
+clear pathhelp pathdemos get_absolute_file_path add_help_chapter LANGUAGE;
 // ====================================================================
index c9154b6..a0eaa56 100644 (file)
@@ -7,7 +7,7 @@ end
 oldln=lines();
 lines(0)
 deff('[]=demoex(num)','execstr(demolist(num,2))')
-tkpath=SCI+'/demos/tk/'
+tkpath=SCI+'/modules/tclsci/demos/tk/'
 if MSDOS then tkpath=strsubst(tkpath,'/','\'),end
 
 demolist=[
index e6b064b..cb8c615 100644 (file)
@@ -10,14 +10,17 @@ global LANGUAGE
 
 path = get_absolute_file_path('tclsci.start');
 path = getshortpathname(path);
+pathdemos = pathconvert(part(path,1:(length(path)-5))+'/demos/tk/tk.dem',%f,%f);
 
 if LANGUAGE == 'fr' then
-       path = pathconvert(part(path,1:(length(path)-5))+'/help/fr',%f,%f);
-       add_help_chapter("Interface Tcl/Tk",path);
+       pathhelp = pathconvert(part(path,1:(length(path)-5))+'/help/fr',%f,%f);
+       add_help_chapter("Interface Tcl/Tk",pathhelp);
+       add_demo('Interface Tcl/Tk',pathdemos);
 elseif LANGUAGE == 'eng' then
-       path = pathconvert(part(path,1:(length(path)-5))+'/help/eng',%f,%f);
+       pathhelp = pathconvert(part(path,1:(length(path)-5))+'/help/eng',%f,%f);
        add_help_chapter("Tcl/Tk Interface",path);
+       add_demo('Tcl/Tk Interface',pathdemos);
 end
 
-clear path get_absolute_file_path add_help_chapter LANGUAGE;
+clear pathhelp pathdemos get_absolute_file_path add_help_chapter LANGUAGE;
 // ====================================================================