FROM : Justin Lundy
DATE : Wed Jan 01 00:03:34 2003
Figured it out: In the App controller in awakeFromNib.
Actual code varied somewhat.
- Justin
On Monday, December 30, 2002, at 10:57 AM, Justin Lundy wrote:
> I'm using an NSOutlineView as a file system browser and want to get the
> icons for each file to show up next to the item. I looked through the
> archives and found that I needed to add two parts to get this to work,
> first change the NSCell to an NSBrowserCell, and then add the function
> that gives the cell its image.
>
> In the data source I added:
>
> - (void)outlineView:(NSOutlineView *)outlineView
> willDisplayCell:(id)cell forTableColumn:(NSTableColumn
> *)tableColumn item:(id)item
> {
> [cell setImage: [(NSImage *)iconForFile:(NSString *)fullPath]];
> }
>
> But Where do I add to following? Should it be in the data source or
> the app controller?
>
> [fileColumn setDataCell:[[NSBrowserCell alloc] init]];
>
>
> Thanks in advance,
>
> Justin
> _______________________________________________
> cocoa-dev mailing list | <email_removed>
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Wed Jan 01 00:03:34 2003
Figured it out: In the App controller in awakeFromNib.
Actual code varied somewhat.
- Justin
On Monday, December 30, 2002, at 10:57 AM, Justin Lundy wrote:
> I'm using an NSOutlineView as a file system browser and want to get the
> icons for each file to show up next to the item. I looked through the
> archives and found that I needed to add two parts to get this to work,
> first change the NSCell to an NSBrowserCell, and then add the function
> that gives the cell its image.
>
> In the data source I added:
>
> - (void)outlineView:(NSOutlineView *)outlineView
> willDisplayCell:(id)cell forTableColumn:(NSTableColumn
> *)tableColumn item:(id)item
> {
> [cell setImage: [(NSImage *)iconForFile:(NSString *)fullPath]];
> }
>
> But Where do I add to following? Should it be in the data source or
> the app controller?
>
> [fileColumn setDataCell:[[NSBrowserCell alloc] init]];
>
>
> Thanks in advance,
>
> Justin
> _______________________________________________
> cocoa-dev mailing list | <email_removed>
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Justin Lundy | Dec 30, 19:57 | |
| Justin Lundy | Jan 1, 00:03 | |
| Robert Cerny | Jan 2, 09:07 | |
| Robert Cerny | Jan 2, 09:09 |






Cocoa mail archive

