<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css">
<title>
Gambas Documentation - _unknown
</title>
</head>
<body>
<table class="none" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td align="left">
<font size="-1">
<a href="../../../../help%3Fen"><img class="flag" alt="Home" border="0" src="../../../../img/lang/en.png" align="center"></a>&nbsp;&nbsp;
<a href="../special%3Fen">Up</a>&nbsp;&nbsp;
<a href="_put%3Fen">Previous</a>&nbsp;&nbsp;
<a href="../store%3Fen">Next</a>&nbsp;&nbsp;
</td></tr></table>
<div class="notab">
<h1>
_unknown
</h1>
<div class="black"><font color="white" size="-2"><b>Declaration</b></font></div>
<pre class="syntax">GB_METHOD ( &quot;_unknown&quot; , &quot;v&quot; , MyClass_unknown , &quot;.&quot; )</pre><p>

The <tt>_unknown</tt> method is called when the interpreter didn't find a method or property symbol
in the class declaration.
<p>
This method takes a variable number of arguments, and returns a <a href="../../../lang/type/variant%3Fen">Variant</a> value.
<p>
Inside the implementation function:
<ul>
<li>The <a href="../../name/gb.isproperty%3Fen">GB.IsProperty</a> function will tell you if the unknown symbol was used as a property or as a method.
<li>The <a href="../../name/gb.getunknown%3Fen">GB.GetUnknown</a> function will return the name of the unknown symbol.
<li>The <a href="../../name/gb.nparam%3Fen">GB.NParam</a> function will return the number of arguments passed to the function.
<p>
</ul>

The <a href="../../../comp/gb.qt.kde/application%3Fen">Application</a> class of the <tt>gb.qt.kde</tt> component is a good example of the use of this feature.
When you do a DCOP call, the interpreter doesn't know if the application is loaded, if the method exists, what its parameters are, and so on. So the <tt>_unknown</tt> special method is welcome !
<p>
<hr><b>See also</b><br>
<a href="../special%3Fen">Special Methods</a>&nbsp;&nbsp; <a href="../method%3Fen">Methods Implementation</a>&nbsp;&nbsp; <a href="../unknown%3Fen">Unknown Special Method Management</a>&nbsp;&nbsp;

</div>
<hr>
</body>
</html>

