• 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: Quincey Morris <email@hidden>
  • Date: Sun, 22 Jun 2008 12:44:16 -0700


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.


_______________________________________________

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>)
 >Re: A documentation dumdum (From: Jeff LaMarche <email@hidden>)
 >Re: A documentation dumdum (From: William Squires <email@hidden>)

  • Prev by Date: Re: Application Main window not appearing on application launch (updated)
  • Next by Date: Re: Save animation to QuickTime movie?
  • Previous by thread: Re: A documentation dumdum
  • Next by thread: Re: A documentation dumdum
  • Index(es):
    • Date
    • Thread