• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: A documentation dumdum
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A documentation dumdum


  • Subject: Re: A documentation dumdum
  • From: Daniel Richman <email@hidden>
  • Date: Sun, 22 Jun 2008 09:14:18 -0700

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@hidden)

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:


This email sent to email@hidden
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >A documentation dumdum (From: William Squires <email@hidden>)

  • Prev by Date: Re: A documentation dumdum
  • Next by Date: Re: A documentation dumdum
  • Previous by thread: Re: A documentation dumdum
  • Next by thread: Interesting Problem Code worked in 10.4 but not in 10.5
  • Index(es):
    • Date
    • Thread