]> git.draconx.ca Git - gob-dx.git/blobdiff - doc/gob.1.in
Release 0.93.2
[gob-dx.git] / doc / gob.1.in
index df1472bb2635388ea692b713549c6bf2c9b71e02..a2724c6ead2359ae90eb435348534a8d5d47f73c 100644 (file)
@@ -508,6 +508,22 @@ The onerror value is also used in overrides that have a return value, in
 case there isn't a parent method, PARENT_HANDLER will return it.  More about
 this later.
 .PP
+Default return:
+.PP
+Some signal and virtual methods have a return type.  But what happens if
+there is no default handler and no one connects to a signal.  GOB will
+normally have the wrappers return whatever you specify with onerror or '0'
+if you haven't specified anything.  But since 0.93.2 you can specify a default
+return value with the keyword 'defreturn'.  It's use is identical to the
+use of onerror, and you can in fact use both at the same time.  Example
+.nf
+
+  virtual int get_some_int(self) onerror -1 defreturn 10 ;
+
+.fi
+That is an empty virtual method (in C++ terms a pure virtual).  If you never
+specify any handler for it in the derived children it will just return 10.
+.PP
 Constructor methods:
 .PP
 There are two methods that handle the construction of an object, init and