Yair - I've found one issue that should be resolved:
If after calling findjobj with the "persist" option the main GUI window is moved, then subsequent calls to findjobj will fail to return the object handle. This is because the container (or pContainer) is one of the persisted variables, and the processPositionArgs function uses container.getX and container.getY to filter the java objects.
To make matters worse, a subsequent call to findjobj without the "persist" argument does not disable persistence. The way I read the code, the only way to force findjobj to recalculate all of the positions is to call it first on a separate figure with the "persist" argument and then on the desired figure without the "persist" argument. (I haven't tested this so I could be wrong). I think this could be fixed fairly easily with a few code changes around line 237.
The complete fix will be a little more involved though.
It looks like others (i.e. Kesh Ikuma) have had similar issues. I've rated this as a 4 for an awesome tool. This would be a 5 if the "persist" option could be made to reset if the figure is moved or resized.
I made a few tweaks which you may be interested in implementing.
I added the following properties to the figure:
'position',[0 -40 1 1]
'Name','Press a key'
On Windows this places the figure off of the screen, instead of behind the taskbar. This will help ensure that the figure is not visible since some users may place their taskbar elsewhere on the screen.
It is also possible for the user to maximize the figure and then close it, which would cause an error when attempting to delete the figure handle. To procect against this use the following code:
This is an awesome tool. Thanks for your sharing your work Yair.
14 Oct 2009
Convert PostScript file to PDF using Ghostscript; can generate multi-page PDF files.
Author: Richard Quist
Great idea! I did experience problems when using this script in a deployed application (R2009a). The built-in version of Ghostscript doesn't work in deployed applications. It returns the following error:
??? Undefined function or method 'gscript' for input arguments of type 'char'.
Clearly it is failing to recognize the call to gscript altough the function handle was created correctly, and the needed mexw32 file is distributed with the MCR v7.10