Skip navigation.
 
mlRe: A documentation dumdum
FROM : Quincey Morris
DATE : Sun Jun 22 21:44:16 2008

On Jun 22, 2008, at 09:46, William Squires wrote:

> Okay, thanks. It seems to work if I just typecast it to NSString *, 
> since the values are coming from an NSTextField as [textField 
> stringValue] in my AppController.m when the action is triggered from 
> the "Add" buttton.
>


Just typecasting isn't really the answer to your underlying worry 
here. After all, if your are passed an object that isn't a NSString, 
typecasting it won't help you.

If your implementation of tableView:setObjectValue:forTableColumn:row 
expects the value to be a string, it would be better to check if it 
isKindOfClass:[NSString class], and assign it to a NSString* local 
variable (no cast actually needed) if it is, or handle the error if 
it's not.

Related mailsAuthorDate
mlA documentation dumdum William Squires Jun 22, 18:02
mlRe: A documentation dumdum Jeff LaMarche Jun 22, 18:13
mlRe: A documentation dumdum Daniel Richman Jun 22, 18:14
mlRe: A documentation dumdum Jens Alfke Jun 22, 18:22
mlRe: A documentation dumdum William Squires Jun 22, 18:46
mlRe: A documentation dumdum Quincey Morris Jun 22, 21:44