1 2 3 4 5 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
<html>
<head>
<title>EAGLE Help: dlgAccept()</title>
</head>
<body bgcolor=white>
<font face=Helvetica,Arial>
<hr>
<i>EAGLE Help</i>
<h1><center>dlgAccept()</center></h1>
<hr>
<dl>
<dt>
<b>Function</b>
<dd>
Closes the dialog and accepts its contents.
<p>
<dt>
<b>Syntax</b>
<dd>
<tt>void dlgAccept([ <i>int Result</i> ]);</tt>
<p>
<dt>
<b>Description</b>
<dd>
The <tt>dlgAccept</tt> function causes the <a href=291.htm>dlgDialog</a> to be closed
and return after the current statement sequence has been completed.
<p>
Any changes the user has made to the dialog values will be accepted and are copied into
the variables that have been given when the <a href=287.htm>dialog objects</a>
were defined.
<p>
The optional <tt>Result</tt> is the value that will be returned by the dialog.
Typically this should be a positive integer value.
If no value is given, it defaults to <tt>1</tt>.
<p>
Note that <tt>dlgAccept()</tt> does return to the normal program execution,
so in a sequence like
<pre>
dlgPushButton("OK") {
dlgAccept();
dlgMessageBox("Accepting!");
}
</pre>
the statement after <tt>dlgAccept()</tt> will still be executed!
</dl>
<b>See also</b> <a href=316.htm>dlgReject</a>,
<a href=291.htm>dlgDialog</a>,
<a href=318.htm>A Complete Example</a>
<p>
<b>Example</b>
<pre>
int Result = dlgDialog("Test") {
dlgPushButton("+OK") dlgAccept(42);
dlgPushButton("Cancel") dlgReject();
};
</pre>
<hr>
<table width=100% cellspacing=0 border=0><tr><td align=left><font face=Helvetica,Arial>
<a href=index.htm>Index</a>
</font></td><td align=right><font face=Helvetica,Arial size=-1>
<i>Copyright © 2005 CadSoft Computer GmbH</i>
</font></td></tr></table>
<hr>
</font>
</body>
</html>
|