Re: NSCell -setFont Clobbers Editability?
Re: NSCell -setFont Clobbers Editability?
- Subject: Re: NSCell -setFont Clobbers Editability?
- From: Seth Willits <email@hidden>
- Date: Sun, 28 Aug 2005 17:29:10 -0700
On Aug 28, 2005, at 5:02 PM, Seth Willits wrote:
I have an NSTextFieldCell subclass and I've noticed that if I call
setFont: on it, the cell refuses to be editable, even if you call
setFont before calling setEditable:YES. The docs say:
"Sets the font to be used when the receiver displays text. If the
receiver is not a text-type cell, the method converts it to
that type."
That makes me wonder. Is it clobbering my cell (in some way I can't
figure out) because it thinks it isn't a "text-type" cell? I can
work around it, no problem, but this seems weird/wrong to me.
Turns out, this only happens if you pass a nil font to the cell. I
assumed that table views always had a font, so with [cell setFont:
[table font]] I was really just setting it to nil, which is what
triggers the problem. I'm still not sure exactly _why_ it's a
problem, but at least this is much easier to deal with than it being
a problem with calling setFont at all.
--
Seth Willits
_______________________________________________
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