Re: Subclassing NSTextFieldCell - can't even get started!
Re: Subclassing NSTextFieldCell - can't even get started!
- Subject: Re: Subclassing NSTextFieldCell - can't even get started!
- From: Matt Neuburg <email@hidden>
- Date: Mon, 26 Nov 2007 08:03:24 -0800
- Thread-topic: Subclassing NSTextFieldCell - can't even get started!
On Mon, 26 Nov 2007 16:52:14 +1300, David Preece <email@hidden>
said:
>Well, this has been a thoroughly unpleasant afternoon.
>
>I'm attempting to modify the "edit" behaviour of an app containing an
>NSOutlineView. A little research reveals that what I am attempting to
>do is change the behaviour of an NSTextFieldCell by subclassing it.
>I've written a really simple subclass, introduced it to IB2 and set
>the class of the appropriate cell to be the name of the subclass but
>can't even get init called, let alone editWithFrame.
>
>Does anyone have any insights into a step I have missed or otherwise?
>I've been working on a slightly hacked up version of the OutlineView
>sample code and that can be downloaded here
(http://www.mediafire.com/?8dmnqlx9zme
>). If someone could look at it I'd be much obliged.
There is an example on your hard drive called DragNDropOutlineView. In that
example, NSTextFieldCell is subclassed and the subclass is displayed in an
NSOutlineView. editWithFrame is overridden and the override is called.
Perhaps looking at that example and comparing it with what you're doing
could be a useful heuristic. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
One of the 2007 MacTech Top 25: <http://tinyurl.com/2rh4pf>
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden