Re: Possible addition of a connectReplaceByName to sigslot_core

Mark Anderson <[email protected]>
Newsgroups gmane.comp.windows.devel.netwindows
Message-ID <[email protected]>
I'm not sure what you would have connectReplaceByName do.

Slots are identified by (slotObj, slotMethodName) pairs.
Are you saying you'd like the library to support wiping out all 
subscribers (er, slots)
which use the specified slotMethodName, regardless of slotObj?
Seems a little dangerous, in case some unrelated subscriber happens to 
use the same method name.

If you have the previous slotObj around, then delete is easy, because 
you have
the original pair.

Regardless of the merits of this extension to the library, there may be 
other ways
to solve your problem, by simply not registering the ephemeral objects 
to begin
with, but instead register a permanent static "manager" which delegates.

So instead of replacing the current "geegaa" instance all the time, you 
could
instead register the pair (GeegahManager, handleWhatever).
Then
GeegahManager.handleWhatever = function() {
   var curgg = this.getCurrentGeegah();
    if (curgg) curgg.handleWhatever.apply(curgg, arguments);
}

-mda



_______________________________________________
The netWindows developers list: [email protected]
http://netwindows.org/mailman/listinfo/devel_netwindows.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.