 |
 |
OmniWeb Style Download Manager–
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Status:
Offline
|
|
Hi, how can I recreate the OmniWeb/OmniOutliner download manager in Cocoa? The cells can contain anything, check boxes, text, progress bars, etc... I need to know how to create the cell and then apply it to a table or outline view. Any help (especially examples) are greatly appreciated.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status:
Offline
|
|
OmniWeb's downloads view is not an NSTableView, but a custom widget that manages full-fledged views (as opposed to cells) in a one-dimensional matrix. It'd be nice to generalize this widget's functions and put it in OmniAppKit -- I wrote it with that in mind -- but right now it's too specialized for OmniWeb to be worth sharing. Maybe we'll be able to open-source it in the 5.0 timeframe, but don't consider that a promise. It's actually not too hard to implement yourself... You just need an NSView subclass that does some more involved managing of its subview array.
OmniOutliner, likewise, has its own NSView subclass, not a specialized NSTableView or NSOutlineView. I believe it does use real live NSButtonCells, though.
It's actually not difficult to use checkboxes as cells in an NSTableView: When setting up your view (probably in awakeFromNib), init an NSButtonCell with the parameters you want, and then pass it to the NSTableColumn instance in -setDataCell:. Then in your datasource methods, get and set the state of the checkbox as an NSNumber whose value equates to YES or NO.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Status:
Offline
|
|
Originally posted by Rickster:
<STRONG>OmniWeb's downloads view is not an NSTableView, but a custom widget that manages full-fledged views (as opposed to cells) in a one-dimensional matrix. It'd be nice to generalize this widget's functions and put it in OmniAppKit -- I wrote it with that in mind -- but right now it's too specialized for OmniWeb to be worth sharing. Maybe we'll be able to open-source it in the 5.0 timeframe, but don't consider that a promise. It's actually not too hard to implement yourself... You just need an NSView subclass that does some more involved managing of its subview array.
OmniOutliner, likewise, has its own NSView subclass, not a specialized NSTableView or NSOutlineView. I believe it does use real live NSButtonCells, though.
It's actually not difficult to use checkboxes as cells in an NSTableView: When setting up your view (probably in awakeFromNib), init an NSButtonCell with the parameters you want, and then pass it to the NSTableColumn instance in -setDataCell:. Then in your datasource methods, get and set the state of the checkbox as an NSNumber whose value equates to YES or NO.</STRONG>
Sorry, I get what you mean, but could you provide some code examples?
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|