	From: 	MAILER-DAEMON@netmail02.services.quay.plus.net
To: 	bigbadwolf@gingerbread.plus.com
Subject: 	failure notice
Date: 	27 Jun 2003 08:22:09 +0000	
Hi. This is the qmail-send program at netmail02.services.quay.plus.net. 
I'm afraid I wasn't able to deliver your message to the following addresses. 
This is a permanent error; I've given up. Sorry it didn't work out. 

<mike@plantechltc.co.uk>: 
Sorry, I couldn't find any host named plantechltc.co.uk. (#5.1.2) 

--- Below this line is a copy of the message. 

Return-Path: <bigbadwolf@gingerbread.plus.com> 
Received: (qmail 14813 invoked from network); 27 Jun 2003 08:22:09 -0000 
Received: from gingerbread.plus.com (HELO siberian.nothing.net) (212.159.44.193) 
  by netmail02.services.quay.plus.net with SMTP; 27 Jun 2003 08:22:09 -0000 
Subject: Trees 
From: Mike Anderson <bigbadwolf@gingerbread.plus.com> 
To: mike@plantechltc.co.uk
Content-Type: text/plain 
Content-Transfer-Encoding: 7bit 
X-Mailer: Evolution/1.0.2-5mdk 
Date: 27 Jun 2003 09:20:51 +0100 
Message-Id: <1056702052.2733.26.camel@siberian.nothing.net> 
Mime-Version: 1.0 

_unary_callback could be any signal handler (appropriate to the signal). 

We could change Signal to accept binary callbacks quite easily - just 
check the number of parameters to selector, and connect to unary 
callback, binary callback or ternary (sp?) callback. 

More difficult to specify which C function is the callback, as 
parameters will vary. 



  cb->handler_id = g_signal_connect( 
    G_OBJECT(widget), 
    signal, 
    G_CALLBACK(_unary_callback), 
    cb 
  ); 


onST: aSignal from: aSource send: aSelector to: aReceiver 
  source := aSource. 
  signal := aSignal. 
  receiver := aReceiver. 
  selector := aSelector asSymbol. 
! 

!Signal methodsFor: 'callbacks'! 

callback 
  receiver perform: selector with: source. 
! 

!Signal methodsFor: 'control'! 

connect 
  selector numArgs ~= 1 ifTrue: [ 
    self error: 'Can''t connect ''', selector, ''' to ', 
      selector printString, '; is has the wrong number of arguments.' 
  ]. 
  self class cConnect: source gtk signal: signal callback: self. 
  connected := true. 
! 

!Widget methodsFor: 'signals'! 

connectSignal: aSignal to: aReceiver send: aSelector 
  "aSelector is a one-argument message that receives this widget as its 
 argument" 
  | sel sig | 
  sel := aSelector asSymbol. 
  sig := Signal new on: aSignal from: self send: sel to: aReceiver. 

  signals isNil ifTrue: [signals := Dictionary new]. 
  signals at: aSignal asSymbol put: sig. 
! 