FROM : Daniel Richman
DATE : Sun Jun 22 18:14:18 2008
I think it's fine. This was my code for your exercise:
-(void)tableView:(NSTableView *)aTableView
setObjectValue:(id)anObject
forTableColumn:(NSTableColumn *)aTableColumn
row:(int)rowIndex
{
NSLog(@"Replacing '%@' with '%@'", [toDoList
objectAtIndex:rowIndex], anObject);
[toDoList replaceObjectAtIndex:rowIndex withObject:anObject];
}
Don't worry about giving it to the table view as an NSString. It can
take any type of object fine. Don't type cast it.
Daniel
William Squires wrote:
> okay, looking up tableView:setObjectValue:forTableColumn:row shows
> that setObjectValue: takes an (id), but what is it really? An NSString
> pointer? I want to get an NSString that represents the new value the
> user typed in for the selected (and edited) cell in the NSTableView.
> Can I safely typecast this to (NSString *)? In which case, maybe the
> docs should say that this is an (NSString *) instead of (id)?
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
>
> This email sent to <email_removed>
DATE : Sun Jun 22 18:14:18 2008
I think it's fine. This was my code for your exercise:
-(void)tableView:(NSTableView *)aTableView
setObjectValue:(id)anObject
forTableColumn:(NSTableColumn *)aTableColumn
row:(int)rowIndex
{
NSLog(@"Replacing '%@' with '%@'", [toDoList
objectAtIndex:rowIndex], anObject);
[toDoList replaceObjectAtIndex:rowIndex withObject:anObject];
}
Don't worry about giving it to the table view as an NSString. It can
take any type of object fine. Don't type cast it.
Daniel
William Squires wrote:
> okay, looking up tableView:setObjectValue:forTableColumn:row shows
> that setObjectValue: takes an (id), but what is it really? An NSString
> pointer? I want to get an NSString that represents the new value the
> user typed in for the selected (and edited) cell in the NSTableView.
> Can I safely typecast this to (NSString *)? In which case, maybe the
> docs should say that this is an (NSString *) instead of (id)?
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
>
> This email sent to <email_removed>
| Related mails | Author | Date |
|---|---|---|
| William Squires | Jun 22, 18:02 | |
| Jeff LaMarche | Jun 22, 18:13 | |
| Daniel Richman | Jun 22, 18:14 | |
| Jens Alfke | Jun 22, 18:22 | |
| William Squires | Jun 22, 18:46 | |
| Quincey Morris | Jun 22, 21:44 |






Cocoa mail archive

