Re: sub classing NSTableView
Re: sub classing NSTableView
- Subject: Re: sub classing NSTableView
- From: Bill Cheeseman <email@hidden>
- Date: Sat, 28 Sep 2002 05:33:14 -0400
on 02-09-28 3:33 AM, Drew McCormack at email@hidden wrote:
>
On Saturday, September 28, 2002, at 08:38 AM, Donald Hall wrote:
>
>
> Okay, I've got my NSTableView nicely set up - columns and other
>
> attributes just the way I want them, but now I realize I need to
>
> subclass to add in drag and drop capability. Is there some way I can
>
> change the class of my carefully laid out table in IB without having
>
> to start from scratch? In other words, will I have to delete my table
>
> and drag in a custom view, make it a subclass of NSTableView, and
>
> redraw everything?
>
>
No. Just select the tableview and open the inspector for it. Select the
>
"Custom Class" tab, and select you subclass. You will need to drag the
>
subclass header to IB first though.
Or, instead of subclassing, write a category on NSTableView and put the drag
and drop protocol methods in the category. That's how I do it.
Or, according to the documentation, put the protocol methods in your
window's delegate.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont -
http://members.valley.net/croquetvermont
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.