FROM : Kyle Sluder
DATE : Sun Jun 08 22:11:02 2008
On Sun, Jun 8, 2008 at 1:37 PM, Joan Lluch (casa) <<email_removed>> wrote:
> return ( item && [[item representedObject] isKindOfClass:[GroupNode
> class]] ) ;
Style note: you don't need to do this. [[item representedObject]
isKindOfClass:[GroupNode class]] will work just fine, because messages
to nil return zero or their logical equivalent. So if item == nil,
then [item representedObject] == nil, which means that [[item
representedObject] isKindOfClass:[GroupNode class]] == NO.
Of course, this all works only if the GroupNode class exists. ;-)
--Kyle Sluder
DATE : Sun Jun 08 22:11:02 2008
On Sun, Jun 8, 2008 at 1:37 PM, Joan Lluch (casa) <<email_removed>> wrote:
> return ( item && [[item representedObject] isKindOfClass:[GroupNode
> class]] ) ;
Style note: you don't need to do this. [[item representedObject]
isKindOfClass:[GroupNode class]] will work just fine, because messages
to nil return zero or their logical equivalent. So if item == nil,
then [item representedObject] == nil, which means that [[item
representedObject] isKindOfClass:[GroupNode class]] == NO.
Of course, this all works only if the GroupNode class exists. ;-)
--Kyle Sluder
| Related mails | Author | Date |
|---|---|---|
| Joan Lluch (casa) | Jun 8, 19:37 | |
| Kyle Sluder | Jun 8, 22:11 | |
| Joan Lluch (casa) | Jun 8, 23:04 | |
| Joan Lluch (casa) | Jun 8, 23:34 | |
| Joan Lluch (casa) | Jun 9, 00:02 | |
| Nathan Kinsinger | Jun 9, 03:06 | |
| carbonat | Jun 9, 11:09 | |
| Corbin Dunn | Jun 9, 18:00 | |
| carbonat | Jun 9, 18:21 | |
| Kyle Sluder | Jun 9, 18:45 |






Cocoa mail archive

