FROM : Adam Gerson
DATE : Sat Mar 22 00:20:54 2008
The answer in my case was to first impliment some NSOutlineView
extenssions so that I could actually access the objects stored in the
tree. These can be found at:
http://homepage.mac.com/matthol2/cocoa/page2/page2.html
Then I implemented the NSOutlineView delegate method
- (void)outlineView:(NSOutlineView *)outlineView
willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn
item:(id)item
to update the values in the custom cell from the data in my item.
On Wed, Mar 19, 2008 at 7:05 PM, Adam Gerson <<email_removed>> wrote:
> I want to use the custom Apple subclass ImageAndTextCell.h in my
> NSOutlineView. How would I hook up the Text and Images used by this
> custom sub-class to a TreeController's data? The "value" binding
> already populates the text of the cell. Is there away for me to add a
> second binding to the sub-class and set it programatically? Then with
> a ValueTransformer I could populate the NSImage as well.
>
> I am reading through "Cocoa Bindings Programming Topics"
>
> Thanks,
> Adam
>
DATE : Sat Mar 22 00:20:54 2008
The answer in my case was to first impliment some NSOutlineView
extenssions so that I could actually access the objects stored in the
tree. These can be found at:
http://homepage.mac.com/matthol2/cocoa/page2/page2.html
Then I implemented the NSOutlineView delegate method
- (void)outlineView:(NSOutlineView *)outlineView
willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn
item:(id)item
to update the values in the custom cell from the data in my item.
On Wed, Mar 19, 2008 at 7:05 PM, Adam Gerson <<email_removed>> wrote:
> I want to use the custom Apple subclass ImageAndTextCell.h in my
> NSOutlineView. How would I hook up the Text and Images used by this
> custom sub-class to a TreeController's data? The "value" binding
> already populates the text of the cell. Is there away for me to add a
> second binding to the sub-class and set it programatically? Then with
> a ValueTransformer I could populate the NSImage as well.
>
> I am reading through "Cocoa Bindings Programming Topics"
>
> Thanks,
> Adam
>
| Related mails | Author | Date |
|---|---|---|
| No related mails found. | ||






Cocoa mail archive

