FROM : Scott Anguish
DATE : Mon Nov 19 10:23:04 2007
On Nov 19, 2007, at 4:14 AM, GbT wrote:
> What's the best way to have a sourcelist with a counter next to the
> title as
> you see in many apps (Mail and other indie apps)? I mean the grey
> circle-ellipse with the number of items written inside it.
> Maybe I need to subclass NSCell
Yes, You'd need to write your own subclass of NSCell to do this.
Have a look at the ClockControl and SimpleBrowser examples in /
Developer/Examples/AppKit
> and override the drawInteriorWithFrame:
> method, but how could I set the counter from, let's say, an
> arraycontroller?
>
> Would it be possible using bindings?
You'd need to add bindings support to your subclass of NSCell.
I'm not sure that the on-disk version of ClockControl has this
implemented.. you may want to check the web version at
developer.apple.com to see if it is more current.
DATE : Mon Nov 19 10:23:04 2007
On Nov 19, 2007, at 4:14 AM, GbT wrote:
> What's the best way to have a sourcelist with a counter next to the
> title as
> you see in many apps (Mail and other indie apps)? I mean the grey
> circle-ellipse with the number of items written inside it.
> Maybe I need to subclass NSCell
Yes, You'd need to write your own subclass of NSCell to do this.
Have a look at the ClockControl and SimpleBrowser examples in /
Developer/Examples/AppKit
> and override the drawInteriorWithFrame:
> method, but how could I set the counter from, let's say, an
> arraycontroller?
>
> Would it be possible using bindings?
You'd need to add bindings support to your subclass of NSCell.
I'm not sure that the on-disk version of ClockControl has this
implemented.. you may want to check the web version at
developer.apple.com to see if it is more current.
| Related mails | Author | Date |
|---|---|---|
| GbT | Nov 19, 10:14 | |
| Scott Anguish | Nov 19, 10:23 | |
| Scott Anguish | Nov 19, 10:30 | |
| GbT | Nov 19, 10:42 | |
| GbT | Nov 19, 10:54 | |
| Conor | Nov 20, 12:15 | |
| GbT | Nov 20, 15:38 | |
| Conor | Nov 21, 10:57 |






Cocoa mail archive

