FROM : Jonathan 'Wolf' Rentzsch
DATE : Tue Oct 05 19:41:04 2004
Shaun Wexler, <email_removed>, wrote:
>Ah, I also misread his original question. He wants the number of times
>a particular object is contained in an array, not just the number of
>unique objects. Same principle, different class:
>
> UInt32 countOfObject = [[NSCountedSet setWithArray:array]
>countForObject:object];
Good idea. This project still targets 10.1, which is pre-NSCountedSet,
but I'll use this in other projects. Thanks!
| Jonathan 'Wolf' Rentzsch http://rentzsch.com
| Red Shed Software http://redshed.net
| "better" necessarily means "different"
DATE : Tue Oct 05 19:41:04 2004
Shaun Wexler, <email_removed>, wrote:
>Ah, I also misread his original question. He wants the number of times
>a particular object is contained in an array, not just the number of
>unique objects. Same principle, different class:
>
> UInt32 countOfObject = [[NSCountedSet setWithArray:array]
>countForObject:object];
Good idea. This project still targets 10.1, which is pre-NSCountedSet,
but I'll use this in other projects. Thanks!
| Jonathan 'Wolf' Rentzsch http://rentzsch.com
| Red Shed Software http://redshed.net
| "better" necessarily means "different"
| Related mails | Author | Date |
|---|---|---|
| Jonathan 'Wolf' Re… | Oct 5, 02:13 | |
| Shaun Wexler | Oct 5, 03:04 | |
| Shaun Wexler | Oct 5, 03:19 | |
| Jonathan 'Wolf' Re… | Oct 5, 19:41 | |
| Jonathan 'Wolf' Re… | Oct 5, 20:04 |






Cocoa mail archive

