• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTextField subclass - not using NSTextFieldCell subclass when unarchived from nib?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextField subclass - not using NSTextFieldCell subclass when unarchived from nib?


  • Subject: Re: NSTextField subclass - not using NSTextFieldCell subclass when unarchived from nib?
  • From: Julio Cesar Silva dos Santos <email@hidden>
  • Date: Sat, 29 Jul 2006 11:11:24 -0300

Try the following test:

if ([self isKindOfClass:[MyTextField class]]) {
    ...
}

Julio Cesar Silva dos Santos
email@hidden
Blogjective-C
http://www.jcs.santos.nom.br/wp
FetchYourLyrics
http://www.jcs.santos.nom.br/fyl/fyl.html


On 29/07/2006, at 11:03, Jim Correia wrote:

I have two subclassses:

MyTextField
MyTextFieldCell

I've dragged an NSTextField out into my window in IB, and set its custom class to MyTextField.

In the MyTextField implementation I've tried both (and at the same time)

+ (void)initialize
{
	if (self == [MyTextField class]) {
		[self setCellClass: [MyTextFieldCell class]];
	}
}

+ (Class)cellClass
{
	return [MyTextFieldCell class];
}

Still, NSTextFieldCell is used, and not my subclass. (Strangely, I do not run into the same problem with subclassing NSTokenField/ NSTokenFieldCell.)

What have I overlooked?

How can I get MyTextFieldCell to be used as the cell for MyTextField when unarchived from a nib?

Thanks,
Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSTextField subclass - not using NSTextFieldCell subclass when unarchived from nib?
      • From: Jim Correia <email@hidden>
References: 
 >NSTextField subclass - not using NSTextFieldCell subclass when unarchived from nib? (From: Jim Correia <email@hidden>)

  • Prev by Date: Re: NSTextField subclass - not using NSTextFieldCell subclass when unarchived from nib?
  • Next by Date: Re: Core Data and auto increment
  • Previous by thread: Re: NSTextField subclass - not using NSTextFieldCell subclass when unarchived from nib?
  • Next by thread: Re: NSTextField subclass - not using NSTextFieldCell subclass when unarchived from nib?
  • Index(es):
    • Date
    • Thread