Hi Paolo,

again a small patch to improve Gtk binding :). 
Just raises an exception if the connection doesn't work.

Gwen

diff --git a/packages/gtk/MoreFuncs.st b/packages/gtk/MoreFuncs.st
index a07ae29..9f17a8a 100644
--- a/packages/gtk/MoreFuncs.st
+++ b/packages/gtk/MoreFuncs.st
@@ -57,6 +57,24 @@ GLib class extend [
 ^L
 GObject extend [

+    connect: name to: handler selector: sel userData: userData [
+       <category: 'C call-outs'>
+
+       | result |
+       (result := self connectSignal: name to: handler selector: sel
userData: userData).
+       result == -1 ifTrue: [ self error: 'Invalid widget passed' ].
+       result == -2 ifTrue: [ self error: 'Invalid event name' ].
+       result == -3 ifTrue: [ self error: 'Invalid selector' ].
+       result == -4 ifTrue: [ self error: 'Too much arguments' ].
+       ^ result
+    ]
+
+    connect: name to: handler selector: sel [
+       <category: 'C call-outs'>
+
+       ^ self connect: name to: handler selector: self userData: nil
+    ]
+
     connectSignal: name to: handler selector: sel userData: userData [
        <category: 'C call-outs'>
        <cCall: 'gstGtkConnectSignal' returning: #int




_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to