On 3 Dec 2008, at 14:51, Niels Grewe wrote:

On Tue, Dec 02, 2008 at 01:22:13PM +0000, David Chisnall wrote:
I believe this is a (new) bug in GNUstep, since it did work with the
version I was using until a few weeks ago.  I've CC'd this to Gregory
so he can have a look.

I investigated the matter further and it's quite obvious what's
going on: NSKeyedUnarchiver, which is used to process the nib, uses
-initWithCoder: self to initialize the objects from the nib.
Now the -initWithCoder method for the NSWindowController class calls
-versionForClassName on its coder and this method isn't
implemented in NSKeyedUnarchiver and thus fails if a decoder of
this type is used. NSCoder won't take the job because it declares
that method a subclassResponsiblity, hence the exception.
The change to use -versionForClassName in the -initWithCoder
method of NSWindowController was introduced into gnustep with
r26956. Few other classes from gui seem to have it. But I'm not
sure whether to blame that change: Shouldn't NSKeyedUnarchiver
actually implement -versionForClassName? I'm going to write a bug
report for this latter. But it's good to know what's going on.

I think that makes sense. -versionForClassName probably ought to return 0 if it doesn't know.

If you're working on this, then I can send you my initial work (which,
sadly, isn't much - I got distracted early on) if you like.  I'd
rather see some generally-useful code in EtoileFoundation and a
simplified XMPPKit than some extra special-case code in XMPPKit (I may have mentioned before, but the XMPPConnection class is a horrible mess
in need of some serious work).

I would like having a look at your ETSocket code, but I'm not
sure whether I'd make good use of it - I'm not yet very savvy
with most of the low level stuff. What I did was write some
stub code that does unicast service discovery via libudns and
glue it into XMPPConnection. The motivation was that I thought
that service discovery (and announcement) would be semantically
coherent enough to outsource them into a proper ServiceKit
someday.

I think we might be confusing two things here. SRV records are used by some Jabber servers so they can run on a nonstandard port. You don't want to be implementing the DNS lookup yourself here, because your OS has a nice resolver that does it for you and exposes it via a clean, portable, interface. I've attached my ETSocket work-not-really- in-progress which shows how to do this. It would be easy to just replace the connect code in XMPPKit with this, although I was waiting until ETSocket was a bit more completed so that we could simplify XMPPConnection a lot.

It sounds more like you are talking about serverless support, as provided by iChat.

David

Attachment: ETSocket.m
Description: Binary data


_______________________________________________
Etoile-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-discuss

Répondre à