<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Le 28/11/2019 à 08:57, Antoine
Monmayrant a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:42ca-5ddf7e00-1b-369f1700@131521389">
<pre class="moz-quote-pre" wrap="">Hello Claus,
I've been playing a bit with GUIs for teaching, so maybe I can help.
The issue is that I don't get what your problem is exactly here, so I my answer might be a bit off-topic.
Do not hesitate to rephrase your issue, I'll try a more focused answer.
Anywya, here is how I think your code could be improved:
(1) You can use 'calc' as the callback for all of the editable text field so that your result gets shown right away, without having to press a button.
(2) You should populate all the uicontrols of your gui first, then only update the displayed values, the visibility of the uicontrols, etc inside your calc function. (ie no more creating a uicontrol inside a callback)
(3) The 'tag' property of any uicontrol together with 'findobj()' are really nice to get/set the properties of each existing uicontrol.</pre>
</blockquote>
<p><br>
get() and set() can now use a tagsPath, that might be less
ambiguate than using findobj(), that returns the first component
with a matching tag (unless only unique tags are defined). The
documentation of set() <a moz-do-not-send="true"
href="http://bugzilla.scilab.org/show_bug.cgi?id=15414">is being
overhauled</a>. You may have a look to it <a
moz-do-not-send="true"
href="http://bugzilla.scilab.org/attachment.cgi?id=4997">there</a>.
The same work on the get()'s page <a moz-do-not-send="true"
href="http://bugzilla.scilab.org/show_bug.cgi?id=15226">is
pending</a>.<br>
</p>
<br>
<blockquote type="cite"
cite="mid:42ca-5ddf7e00-1b-369f1700@131521389">
<pre class="moz-quote-pre" wrap="">.../...
I attached a small gui I use to illustrate optical anti-reflection coating.</pre>
</blockquote>
<p>There won't never be too much physics on FileExchange, you know
:-)</p>
<p><br>
</p>
<p>A physicist</p>
<p><br>
</p>
</body>
</html>