Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bd5c3d824c3db63ffd9226c15941e6ad > files > 2378

mozart-1.4.0-1mdv2010.0.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>8.2 Error Dialogs</TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node42.html#section.tools.dialogs">&lt;&lt; Prev</A></TD><TD><A href="node41.html">- Up -</A></TD><TD><A href="node44.html#section.tools.menubars">Next &gt;&gt;</A></TD></TR></TABLE><DIV id="section.tools.error"><H2><A name="section.tools.error">8.2 Error Dialogs</A></H2><P><A name="label335"></A> A dialog to display error messages is provided by the class <CODE>TkTools<SPAN class="keyword">.</SPAN>error</CODE>, which is a sub class of <CODE>TkTools<SPAN class="keyword">.</SPAN>dialog</CODE>. <A href="node43.html#figure.tools.error">Figure&nbsp;8.2</A> shows an example of how to use <CODE>TkTools<SPAN class="keyword">.</SPAN>error</CODE>. </P><P> </P><DIV id="figure.tools.error"><HR><P><A name="figure.tools.error"></A></P><P> </P><DIV align="center"><IMG alt="" src="error.gif"></DIV><P> </P><DL class="anonymous"><DD class="code"><CODE>E={New&nbsp;TkTools<SPAN class="keyword">.</SPAN>error<BR>&nbsp;&nbsp;&nbsp;tkInit(master:W<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;text:&nbsp;<SPAN class="string">'Error&nbsp;in&nbsp;system&nbsp;configuration:&nbsp;'</SPAN><SPAN class="keyword">#</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="string">'too&nbsp;much&nbsp;memory.'</SPAN>)}</CODE></DD></DL><P> </P><P class="caption"><STRONG>Figure&nbsp;8.2:</STRONG> A transient error dialog.</P><HR></DIV><P> </P><DIV class="apropos"><P class="margin">transient widgets</P><P> All dialogs provide for the option <CODE>master</CODE>. By giving a toplevel widget as value for <CODE>master</CODE>, the dialog appears as a <A name="label336"></A><EM>transient</EM> widget: depending on the window manager the widget appears with less decoration, e.&nbsp;g., no title, on the screen. Moreover, when the master widget is closed, the dialog is closed as well. </P></DIV></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node42.html#section.tools.dialogs">&lt;&lt; Prev</A></TD><TD><A href="node41.html">- Up -</A></TD><TD><A href="node44.html#section.tools.menubars">Next &gt;&gt;</A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~schulte/">Christian&nbsp;Schulte</A><BR><SPAN class="version">Version 1.4.0 (20090610)</SPAN></ADDRESS></BODY></HTML>