discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subclassing NSConnection


From: Richard Frith-Macdonald
Subject: Re: Subclassing NSConnection
Date: Wed, 5 Sep 2001 06:40:47 +0000

On Wednesday, September 5, 2001, at 05:38 AM, Gerrit Van Dyk wrote:

What is the correct way to subclass NSConnection?

I need to subclass NSConnection and when I invoke init on this new subclass the init should return an instance of the new class and not a subclass of
NSConnection.

I replaced my [[SubConnection alloc] init] call with
[[SubConnection alloc] initWithReceivePort:[NSPort port] sendPort:nil], and
it now seems to work OK.

Is this the correct way of initialising a subclass of NSConnection?

Yes ... initWithReceivePort:sendPort: is the designated initialiser for the class.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]