• 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
NSValidationNumberTooSmallError with incomplete error message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSValidationNumberTooSmallError with incomplete error message


  • Subject: NSValidationNumberTooSmallError with incomplete error message
  • From: Kaspar Fischer <email@hidden>
  • Date: Tue, 6 Sep 2005 10:54:59 +0200

Hi all,

I use CoreData and the NSKeyValueCoding protocol to
implement validation.  My entity has an attribute
value and therefore I have a routine

- (BOOL)validateValue:(id *)value error:(NSError **)error
{
  // ...
  NSDictionary *userInfo = [NSDictionary dictionaryWithObjectsAndKeys:
    @"value", NSValidationKeyErrorKey,
    *value, NSValidationValueErrorKey,
    self, NSValidationObjectErrorKey, nil];
  *error = [[NSError errorWithDomain:NSCocoaErrorDomain
                                code:NSValidationNumberTooSmallError
                            userInfo:userInfo] retain];
  return NO;
}

The mechanism works fine, but the error sheet that
gets displayed only says

  The document "Untitled" could not be saved.
  %{PROPERTY}@ is too small.

It seems that I am not passing enough information in
the user dictionary to make CoreData replace the ugly
"%PROPERTY@" by "value".  Does anyboy know how to
solve this?

Thanks,
Kaspar
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSValidationNumberTooSmallError with incomplete error message
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: Calling AppleScript from a Cocoa app
  • Next by Date: Drag to Nowhere and Disappearing Smoke
  • Previous by thread: Re: Custom widget in a data cell
  • Next by thread: Re: NSValidationNumberTooSmallError with incomplete error message
  • Index(es):
    • Date
    • Thread