Re: Help understanding Interface Builder/Custom Views
Re: Help understanding Interface Builder/Custom Views
- Subject: Re: Help understanding Interface Builder/Custom Views
- From: Stéphane Sudre <email@hidden>
- Date: Sun, 27 Jul 2003 19:04:27 +0200
On dimanche, juillet 27, 2003, at 06:56 PM, Eric Freeman wrote:
I'd like to create a custom view in IB that will act as a cell of an
NSTableView. In IB I've created this view in my main nib; the view has
an image, text and a few other things. My plan was to use
outlineView:willDisplayCell:forTableColumn:item: as a place to set the
various values in the view. I'm most likely using the wrong approach
here as I'd like to not only instantiate several of these views to fill
the table, but also be able to add my own accessor methods. How can I
achieve this by leveraging IB and not having to write this class from
scratch?
1. Is this a NSTableView or an NSOutlineView you want to use?
2. I don't understand how you can hope to avoid writing this class from
scratch since you at least need to subclass NSCell? You also need to
set the prototype cell of the NS......View to be your cell.Not
instantiate your "view" multiple times.
3. You could have a look at the AppKit Example in the /Developer
folder. The DragAndDropOutlineSomething example may give you some clues.
_______________________________________________
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.