Re: [Scilab-users] How to print GUI window?

2019-08-01 Thread VTX1801
Thanks for the effort to resolve this issue. 
If this has been a known bug since 2016 what is the likelihood it will be
addressed and resolved?
I appreciate the timely responses from Samuel.
Evidently Scilab is not mature enough to use for this application.
Best Regards,
Ted





--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] How to print GUI window?

2019-08-01 Thread VTX1801
Tried your alternate code.
Window appeared with 3d graphic.
Menu was off the screen.
Ran again and menu on screen.

Got the following error in console:

msprintf: Wrong number of input arguments: data doesn't fit with format.



--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] How to print GUI window?

2019-08-01 Thread Samuel Gougeon

Le 02/08/2019 à 00:13, VTX1801 a écrit :

Photos is the default image viewer.
The question regarding the figure is:
Are the plot and the uicontrol considered children of the figure?

Yes

Is there a syntax that would include all children of the figure to print?

It already the  case: only the whole figure can be exported/printed.
The fact that uicontrols do not appear IS the bug 14502.

So, again, this is why you can't escape using an external software to 
get around it.


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] How to print GUI window?

2019-08-01 Thread VTX1801
Photos is the default image viewer.
The question regarding the figure is:
Are the plot and the uicontrol considered children of the figure?
Is there a syntax that would include all children of the figure to print?



--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] How to print GUI window?

2019-08-01 Thread Samuel Gougeon

Le 01/08/2019 à 23:40, VTX1801 a écrit :

Copied your test code to new Scilab program.
Ran the code.
Graphic window appears with plot graph and uicontrol text object at the
bottom with the word Test.
Photos.test window appears with only the plot graph.
The uicontrol is missing.

Is the plot graph the graphic that is exported?
Do you need to assign the whole figure to export?


Here is another version of the code, to capture only the graphical area, 
without the window borders:


// Generate a GUI (from demos)
exec("SCI/modules/gui/demos/uicontrol_plot3d.dem.sce",-1);

f  =  findobj("figure_id",11);
f.visible  =  "on";// Brings the GUI window on the front
fs  =  f.figure_size;
as  =  f.axes_size;
border_width  =  (fs(1)-as(1))/2;
header_height  =  fs(2)-as(2)-border_width;
// Hiding the left border and header of the window out of screen
f.figure_position([1  2])  =  [-border_width  -header_height];

filename  =  "capture_$U(Y-%m-%d %H%M%S).png";  // with a timestamp in the file 
name
filename  =  "capture.png"; // simple fixed file name
iview_path  =  findfileassociation(".png"); // or replace with the fixed 
known path
 // to IrfanView on your computer
cmd  =  "%s /capture=7=(0,0,%d,%d) /convert=%s";
cmd  =  msprintf(cmd,  iview_path,  as(1),  as(2),  filename);
status  =  host(cmd);
winopen(filename);

Samuel

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] How to print GUI window?

2019-08-01 Thread Samuel Gougeon

Le 01/08/2019 à 21:50, Samuel Gougeon a écrit :


// Generate a GUI (from 
demos)exec("SCI/modules/gui/demos/uicontrol_plot3d.dem.sce",-1);f=findobj("figure_id",11);f.figure_position([12])=[00];// 
Imposes the GUI position on the screenf.visible="on";// Brings the GUI 
window on the fronts=f.figure_size;filename="capture_$U(Y-%m-%d 
%H%M%S).png";// with a timestamp in the file 
namefilename="capture.png";// simple fixed file 
nameiview_path=findfileassociation(".png");// or replace with the 
fixed known path// to IrfanView .exe on your computercmd="%s 
/capture=7=(0,0,%d,%d) 
/convert=%s";cmd=msprintf(cmd,iview_path,s(1),s(2),filename);status=host(cmd);winopen(filename);



Other Irfanview command-line options exist and can be included in the 
command string, to print the capture even without saving it in any file, 
namely: /aspectratio /resize_long=size /resize_short=size /rotate_r 
/rotate_l /print etc


The irfanview help is extensive and very clear, with many examples.


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] How to print GUI window?

2019-08-01 Thread Samuel Gougeon

Le 01/08/2019 à 23:40, VTX1801 a écrit :

Copied your test code to new Scilab program.
Ran the code.
Graphic window appears with plot graph and uicontrol text object at the
bottom with the word Test.
Photos.test window appears with only the plot graph.
The uicontrol is missing.



So the bug 14502  is 
still alive, as expected and already checked.



Is the plot graph the graphic that is exported?
Do you need to assign the whole figure to export?


I don't understand what is Photos.test, and your questions.
The scripts only generate in your working directory a test.png or 
capture.png image file -- that is the export/capture of the figure --, 
and opens it in your image viewer.



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] How to print GUI window?

2019-08-01 Thread VTX1801
Copied your test code to new Scilab program.
Ran the code.
Graphic window appears with plot graph and uicontrol text object at the
bottom with the word Test.
Photos.test window appears with only the plot graph.
The uicontrol is missing.

Is the plot graph the graphic that is exported?
Do you need to assign the whole figure to export?

Please advise,
Ted






--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] test_run failed: Slave Scilab exited with error code 127

2019-08-01 Thread Samuel Gougeon

Le 01/08/2019 à 22:49, Samuel Gougeon a écrit :

Le 01/08/2019 à 22:16, philippe a écrit :

...

no all tests fail (excepts those who are skipped automatically) :



This could come from an autoloaded ATOMS module, if any.
You may try canceling the autoloading of all your installed modules, 
and then rerun test_run.


[a new test_run() option running all slave sessions with the 
-noatomsautoload option would be useful].



Reported as bug 16161 
. Thanks for this 
opportunity to improve test_run().



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] How to print GUI window?

2019-08-01 Thread Samuel Gougeon

Le 01/08/2019 à 23:04, VTX1801 a écrit :

Further testing an some progress.

Suggestion of GUI window not dockable.
Looked at the properties of the figure and there is a dockable property.
The dockable property was set to 'off'.
Set the dockable property to 'on'.

Executed print command and no Java exception error.


Great.


figid = f("figure_id");
disp(figid);
status = printfigure(figid);
disp(status);

Console displays 0 for figid.
Console displays T for status.

One page is printed on the printer.
However, the printed image is about one third of the plot figure only.
As though the scale of the print is zoomed in.

Looking for some property to set print to scale whole image to fill printed 
sheet.
Is there a Scilab printer property for this purpose?



Not AFAIK, even through printsetupbox().
But you can resize the GUI before exporting it, through its handle with 
f.axes_size.


Could you please try with the trivial example below and check whether 
the uicontrol appears on the image (before planning to resize and print 
it ;-):


plot2d()
uicontrol("style","text","string","Test","position",[10,10,100,20]);
xs2png(gcf(),"test.png")
winopen("test.png")


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] How to print GUI window?

2019-08-01 Thread VTX1801
Further testing an some progress.

Suggestion of GUI window not dockable.
Looked at the properties of the figure and there is a dockable property.
The dockable property was set to 'off'. 
Set the dockable property to 'on'.

Executed print command and no Java exception error.

figid = f("figure_id");
disp(figid);
status = printfigure(figid);
disp(status);

Console displays 0 for figid.
Console displays T for status.

One page is printed on the printer.
However, the printed image is about one third of the plot figure only.
As though the scale of the print is zoomed in.

Looking for some property to set print to scale whole image to fill printed
sheet.
Is there a Scilab printer property for this purpose?

Suggestions?
Please advise,
Ted




--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] test_run failed: Slave Scilab exited with error code 127

2019-08-01 Thread Samuel Gougeon

Le 01/08/2019 à 22:16, philippe a écrit :

Le 01/08/2019 à 18:19, Samuel Gougeon a écrit :


Yes, it's a bad start, but it's just for the api_scilab module 
(unfortunately it's the first tested one :/)

Just try with the next one:
test_run("ast",[],"no_check_ref")



no all tests fail (excepts those who are skipped automatically) :



This could come from an autoloaded ATOMS module, if any.
You may try canceling the autoloading of all your installed modules, and 
then rerun test_run.


[a new test_run() option running all slave sessions with the 
-noatomsautoload option would be useful].


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] test_run failed: Slave Scilab exited with error code 127

2019-08-01 Thread Samuel Gougeon

Le 01/08/2019 à 22:16, philippe a écrit :

Le 01/08/2019 à 18:19, Samuel Gougeon a écrit :


Yes, it's a bad start, but it's just for the api_scilab module 
(unfortunately it's the first tested one :/)

Just try with the next one:
test_run("ast",[],"no_check_ref")



no all tests fail (excepts those who are skipped automatically) :



Sorry for you. I can't reproduce on Win7.
You may search to which issue the exit code 127 (coming from the shell 
of your OS) corresponds.


In addition,  do the tests pass when you exec() them (for instance from 
Scinotes) ?



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] test_run failed: Slave Scilab exited with error code 127

2019-08-01 Thread philippe

Le 01/08/2019 à 18:19, Samuel Gougeon a écrit :


Yes, it's a bad start, but it's just for the api_scilab module 
(unfortunately it's the first tested one :/)

Just try with the next one:
test_run("ast",[],"no_check_ref")



no all tests fail (excepts those who are skipped automatically) :


--> test_run("ast",[],"no_check_ref")
   TMPDIR = /tmp/SCI_TMP_20383_fZszyE

 Module  001/001 - [ast] :

   001/154 - [ast] Sand.failed: 
Slave Scilab exited with error code 127
   002/154 - [ast] Sor..failed: 
Slave Scilab exited with error code 127
   003/154 - [ast] addition.failed: 
Slave Scilab exited with error code 127
   004/154 - [ast] addition_output_type.failed: 
Slave Scilab exited with error code 127
   005/154 - [ast] analysis1failed: 
Slave Scilab exited with error code 127
   006/154 - [ast] 
analysis2skipped: not yet fixed






--
   Summary

   tests150 - 100 %
   passed 0 -   0 %
   failed   150 - 100 %
   skipped4
   length 6.18 sec

--
   Details



   TEST : [ast] Sand
   failed: Slave Scilab exited with error code 127


   TEST : [ast] Sor
   failed: Slave Scilab exited with error code 127


   TEST : [ast] addition
   failed: Slave Scilab exited with error code 127


   TEST : [ast] addition_output_type
   failed: Slave Scilab exited with error code 127


   TEST : [ast] analysis1
   failed: Slave Scilab exited with error code 127




fresh install of scilab-6.0.2  on ubuntu 18.04 :


Version de Scilab : 6.0.1.1550134035 <=supposed to be scilab-6.0.2!
Système d'exploitation : Linux 4.15.0-1045-oem
Version Java : 1.8.0_151
Informations sur l'environnement d'exécution Java : Java(TM) SE Runtime 
Environment (build 1.8.0_151-b12)
Informations sur la machine virtuelle Java : Java HotSpot(TM) 64-Bit 
Server VM (build 25.151-b12, mixed mode)

Spécifications du fabricant : Oracle Corporation

but fortunately uman looks to work now ;-)

Best regards
Philippe

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] How to print GUI window?

2019-08-01 Thread Samuel Gougeon

Le 01/08/2019 à 20:34, VTX1801 a écrit :

Hello,
Further test with a simple plot figure does print correctly.
So this issue is somehow related to a larger window GUI with multiple
objects including a plot.


There are potentially 2 issues :

1. your GUI is not dockable. The java error message you get is about that.
2. Even with a dockable GUI, AFAIK and as you can check the export
   fails as soon as there is a uicontrol component in the exported
   figure : it yields to a white image.

So, for the time being, it looks hard to not use an external software to 
export the GUI as an image.

Fortunately, softwares can be called from Scilab.
You will find here-below some code to be run on Windows (it's your OS, 
according to your report).

It uses the famous IrfanView free software.
This code works perfectly for me. It should be easily adaptable to your 
case.


Best regards.
Samuel


// Generate a GUI (from 
demos)exec("SCI/modules/gui/demos/uicontrol_plot3d.dem.sce",-1);f=findobj("figure_id",11);f.figure_position([12])=[00];// 
Imposes the GUI position on the screenf.visible="on";// Brings the GUI 
window on the fronts=f.figure_size;filename="capture_$U(Y-%m-%d 
%H%M%S).png";// with a timestamp in the file 
namefilename="capture.png";// simple fixed file 
nameiview_path=findfileassociation(".png");// or replace with the fixed 
known path// to IrfanView .exe on your computercmd="%s 
/capture=7=(0,0,%d,%d) 
/convert=%s";cmd=msprintf(cmd,iview_path,s(1),s(2),filename);status=host(cmd);winopen(filename);


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] How to print GUI window?

2019-08-01 Thread VTX1801
Hello,
Further test with a simple plot figure does print correctly.
So this issue is somehow related to a larger window GUI with multiple
objects including a plot.
There are three push buttons and list boxes.
The push buttons have call backs.
One to open a windows file dialog window. Which works correctly.
The call back routine includes code to read an Excel file, plot data,
and fill the list boxes with data.
The second push button closes the Scilab session. This works correctly.
The third push button includes the printfigure(get(gcf(), "figure_id"))
command.
This command opens the windows print dialog correctly.
However, when the dialog print selection is clicked the following Java
exception occurs.

printfigure: A Java exception arisen:
Exception when calling Java method :
org.scilab.modules.gui.bridge.tab.SwingScilabStaticPanel cannot be cast to
org.scilab.modules.gui.bridge.tab.SwingScilabDockablePanel
 at org.scilab.modules.gui.bridge.CallScilabBridge.printFigure(Unknown
Source)
org.scilab.modules.gui.bridge.tab.SwingScilabStaticPanel cannot be cast to
org.scilab.modules.gui.bridge.tab.SwingScilabDockablePanel
 at org.scilab.modules.gui.bridge.CallScilabBridge.printFigure(Unknown
Source)

Hope this helps troubleshoot the Scilab environment.
Please advise,
Ted





--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] test_run failed: Slave Scilab exited with error code 127

2019-08-01 Thread Samuel Gougeon

Le 01/08/2019 à 14:22, philippe a écrit :

Hi,

I've just move to a new laptop and I try to rebuild toolboxes I've 
created for scilab-6.0.2, every thing looks fine except that all unit 
tests fail ! I realize that in fact ALL SCILAB unit tests fail  with 
the same error message :



--> test_run([],[],'no_check_ref')
   TMPDIR = /tmp/SCI_TMP_7851_f13kzL

 Module  001/074 - [action_binding] :


 Module  002/074 - [api_scilab] :

   001/053 - [api_scilab] 
booleanExamplefailed: Slave Scilab exited with 
error code 127
   002/053 - [api_scilab] 
booleanSparseExample..failed: Slave Scilab exited with 
error code 127
   003/053 - [api_scilab] 
boolean_writing_api...failed: Slave Scilab exited with 
error code 127
   004/053 - [api_scilab] 
calloverloadfunction_api..failed: Slave Scilab exited with 
error code 127
   005/053 - [api_scilab] 
check_matrix_dimensionfailed: Slave Scilab exited with 
error code 127
   006/053 - [api_scilab] 
common_function...failed: Slave Scilab exited with 
error code 127
   007/053 - [api_scilab] 
common_list_api...failed: Slave Scilab exited with 
error code 127



Yes, it's a bad start, but it's just for the api_scilab module 
(unfortunately it's the first tested one :/)

Just try with the next one:
test_run("ast",[],"no_check_ref")

It's OK.

Samuel


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] test_run failed: Slave Scilab exited with error code 127

2019-08-01 Thread philippe

Hi,

I've just move to a new laptop and I try to rebuild toolboxes I've 
created for scilab-6.0.2, every thing looks fine except that all unit 
tests fail ! I realize that in fact ALL SCILAB unit tests fail  with the 
same error message :



--> test_run([],[],'no_check_ref')
   TMPDIR = /tmp/SCI_TMP_7851_f13kzL

 Module  001/074 - [action_binding] :


 Module  002/074 - [api_scilab] :

   001/053 - [api_scilab] booleanExamplefailed: 
Slave Scilab exited with error code 127
   002/053 - [api_scilab] booleanSparseExample..failed: 
Slave Scilab exited with error code 127
   003/053 - [api_scilab] boolean_writing_api...failed: 
Slave Scilab exited with error code 127
   004/053 - [api_scilab] calloverloadfunction_api..failed: 
Slave Scilab exited with error code 127
   005/053 - [api_scilab] check_matrix_dimensionfailed: 
Slave Scilab exited with error code 127
   006/053 - [api_scilab] common_function...failed: 
Slave Scilab exited with error code 127
   007/053 - [api_scilab] common_list_api...failed: 
Slave Scilab exited with error code 127



Can someone tell me What is wrong here ?

Philippe

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] How to print GUI window?

2019-08-01 Thread VTX1801
Hello,
I am attempting to print the GUI window using various commands in a callback
function.

A Java exception occurs.
For example the following is the error in the console window:

printfigure: A Java exception arisen:
Exception when calling Java method :
org.scilab.modules.gui.bridge.tab.SwingScilabStaticPanel cannot be cast to
org.scilab.modules.gui.bridge.tab.SwingScilabDockablePanel
 at org.scilab.modules.gui.bridge.CallScilabBridge.printFigure(Unknown
Source)

Is this a bug in Scilab?
How do you directly print a GUI window in Scilab?
Exporting window image to a file and then opening other software to print is
unacceptable.
Thanks for the effort to resolve this issue.

Please advise,
Ted




--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] ATOMS does not work on macOS Mojave 10.14.6 - is it a bug? Входящие x IEEE x

2019-08-01 Thread Nikolay Strelkov
Dear community!

I have strange behavior of ATOMS in Scilab 6.0.2 (downloaded from official
link -
http://www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64.dmg )
on macOS Mojave 10.14.6.
The ATOMS does not work on Scilab which normally launched from Applications
menu of from launcher (in normal traditional GUI way).

I got the following screenshot if I simply open Application -> "Module
Manager - ATOMS" ends with dialog window with message "No ATOMS module is
available. Please, check your Internet connection or make sure that your OS
is compatible with ATOMS.". See attached screenshot -
https://bugzilla.scilab.org/attachment.cgi?id=4987 .

Installation of single package also seems to be failed:

--> atomsInstall('animaGIF')
Scanning repository http://atoms.scilab.org/6.0 ... Done

at line65 of function atomsDESCRIPTIONread (
/Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atoms_internals/atomsDESCRIPTIONread.sci
line 125 )
at line   227 of function atomsDESCRIPTIONget  (
/Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atoms_internals/atomsDESCRIPTIONget.sci
line 246 )
at line31 of function atomsIsPackage   (
/Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atoms_internals/atomsIsPackage.sci
line 47 )
at line69 of function atomsInstallList (
/Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atoms_internals/atomsInstallList.sci
line 108 )
at line   233 of function atomsInstall (
/Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atomsInstall.sci
line 249 )

regexp: Unknown error.

On next Scilab start the ATOMS module is not installed.
When I launch Scilab from Terminal with

/Applications/scilab-6.0.2.app/Contents/MacOS/bin/scilab-bin

and try to install ATOMS from Scilab Console - I get the following
error output in the terminal:

dyld: Library not loaded:
/Users/mottelet/git/scilab_dist/Scilab.app/Contents/MacOS/lib/scilab/libscilab-cli.6.dylib
  Referenced from: /Applications/scilab-6.0.2.app/Contents/MacOS/bin/scilab-bin
  Reason: image not found
Abort trap: 6
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]


I have already reported a bug -
https://bugzilla.scilab.org/show_bug.cgi?id=16159 .

Is it just me?
Does anyone have the same problem on macOS Mojave or High Sierra?

--

*With best regards,Ph.D., *


*associate professor at MPEI
,IEEE member,developer of
Mathieu functions toolbox for Scilab
,Nikolay Strelkov.*
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users