<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css">
<title>
Gambas Documentation - _unknown
</title>
</head>
<table class="none" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td align="left">
<font size="-1">
<a href="../../../../help+en"><img class="flag" alt="Home" border="0" src="../../../../img/lang/en.png" align="center"></a>&nbsp;
<a href="../special+en">Up</a>&nbsp;
<a href="_put+en">Previous</a>&nbsp;
<a href="../store+en">Next</a>&nbsp;
</td></tr></table>
<div class="notab">
<h1>
_unknown
</h1>
<div class="black"><font 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+en">Variant</a> value.
<p>
Inside the implementation function:
<ul>
<li>The <a href="../../name/gb.isproperty+en">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+en">GB.GetUnknown</a> function will return the name of the unknown symbol.
<li>The <a href="../../name/gb.nparam+en">GB.NParam</a> function will return the number of arguments passed to the function.
<p>
</ul>

The <a href="../../../comp/gb.qt.kde/application+en">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+en">Special Methods</a>&nbsp; <a href="../method+en">Methods Implementation</a>&nbsp; <a href="../unknown+en">Unknown Special Method Management</a>&nbsp;

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

