Re: [BLACKBOX] Plugin message handlers

From: [at]} <Treutwein>
Date: Thu, 24 May 2012 09:27:05 +0200


Hi Doug,
 
as far as I know, usgae of procedure variables is not recommended, but instead you should use
factories which provide new method installations. Most factories are called in BlackBox directories,
although I don’t find that name very intuitive. They generally provide also a standard implementation,
which can be used as a fallback …
 
Procedure variables bare the danger of pointing to a procedure, which is not available anymore
and therefore severe crashes. As far as I know, procedure variables cannot be garbage collected
(as opposed to methods).
 
Regards
--
   Bernhard
From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xySent: Thursday, May 24, 2012 5:24 AM
To: BLACKBOX{([at]})nowhere.xySubject: [BLACKBOX] Plugin message handlers
 
Folks,
I now find it very convenient to simply plug in a handler for a message
rather than  implementing it again and again for each new view I
create.
MyViews supports procedure variables for each of the possible message
handlers in which I am interested.
For example, I have an AudioFilesView which displays audio wave forms
that I can scroll like an iPad with a sweep of the mouse.  But I also need to
change that behavior when I record into the window such that when the mouse
is pressed recording starts and when it is released recording stops and 
displays the new waveform.  I simply swap back and forth the handlers for the
track message as need be.
I just wonder if anyone else has used procedure variables to implement 
message handlers?
-Doug Danforth
---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy
Received on Thu May 24 2012 - 09:27:05 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:02 UTC