• 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: Showing an error message when the string entered in the NSTableView is too long
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Showing an error message when the string entered in the NSTableView is too long


  • Subject: Re: Showing an error message when the string entered in the NSTableView is too long
  • From: David Spooner <email@hidden>
  • Date: Wed, 10 Oct 2007 12:19:57 -0600

You could create a subclass of NSFormatter, then associate the formatter with the dataCell of the table column. Your subclass would override -getObjectValue:forString:errorDescription: to return the given string if appropriate or raise an exception otherwise.

dave


On 10-Oct-07, at 12:07 PM, vibhatha v wrote:

Hi,

I have an NSTableView and the values that are displayed in the table view
are bound to an entity.
Now say, when i edit my first column, (the column should allow only 5
charcters to be entered) i need to throw an error message if the number of
characters entered are more than 5.
I am using the concept of bindings to populate the table view.
Is there a way by which i can show this error message?


Thanks and Regards,
Vibhatha.
_______________________________________________

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:
40conversionworks.com


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: 
 >Showing an error message when the string entered in the NSTableView is too long (From: "vibhatha v" <email@hidden>)

  • Prev by Date: Re: display int in cocoa
  • Next by Date: Re: Showing an error message when the string entered in the NSTableView is too long
  • Previous by thread: Showing an error message when the string entered in the NSTableView is too long
  • Next by thread: Re: Showing an error message when the string entered in the NSTableView is too long
  • Index(es):
    • Date
    • Thread