Message handling (was RE: [sldev] name of an object?)

Dale Glass dale at daleglass.net
Sun Jul 29 07:16:46 PDT 2007


On Sun, Jul 29, 2007 at 01:26:27PM +0000, Matthew Dowd wrote:
> 
> > Only problem with that is that there can be only one
> > handler per message, and the selection manager already takes it. 
> 
> Yes, I came across this part of the viewer architecture when I was looking at llFloaterGroups.
> 
> To me this whole aspect of the viewer plumbing is extremely messy. Apart from the issue you can only have one handler per message (and have to write redirection handlers the way Able did if you want to), it also means that the setup of the message handlers is in a completely seperate place in the source code to the handler itself (you can't tell that llpanelavatar.cpp handles AvatarGroupsReply, AvatarClassifiedsReply etc. from the llpanelavatar.ccp code itself - and changes such as Dale's makes it even harder to see what is happening).
IMO, my way is better than Able's in that at least it doesn't confuse
what's being used for what purpose -- if you start doing things like
tricking the selection manager into doing the request you want for you,
you'll soon have a tangled mess of mythical proportions, where things
are only not used for their primary purpose but also a few collateral
ones.

The additional level of indirection isn't great, but not that bad
either. And it can be fixed easily anyway.

First step is simply to change things so that multiple handlers are
possible. We can keep the API pretty much like it is, except removing
the restriction.

Now, for initializing in the class, that should be easy: set up the
handler in the constructor. You could leave LL code as it is, and only
use this for new code.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.secondlife.com/pipermail/sldev/attachments/20070729/45fad06a/attachment.pgp


More information about the SLDev mailing list