• 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: Core Data and Undo action names
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data and Undo action names


  • Subject: Re: Core Data and Undo action names
  • From: mmalc crawford <email@hidden>
  • Date: Sat, 10 Mar 2007 09:19:15 -0800


On Mar 10, 2007, at 7:57 AM, Kevin wrote:
- (void)setTitle:(NSString *)value
{
[self willChangeValueForKey: @"title"];
[self setPrimitiveValue:value forKey:@"title"];
[self didChangeValueForKey: @"title"];
[[[self managedObjectContext] undoManager] setActionName:@"Edit Folder Title"];
}


After reading the documentation on Core Data and Localization, I created a MyModel.strings file but it only appears to use the localized names for error messages related to model validation.
MyModel.strings is not consulted for action Undo/Redo names. Is this the expected behavior or am I missing something?


"You can localize most aspects of a managed object model, including entity and property names and error messages" (<http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdUsingMOM.html#//apple_ref/doc/uid/TP40005190-DontLinkElementID_107 >). The undo action name is none of these -- in the above you're just setting a string constant. You should use NSLocalizedString (or one of its variants) just as you would any other string that needs to be localized.

mmalc

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >Core Data and Undo action names (From: Kevin <email@hidden>)

  • Prev by Date: Allowing cancel and progress but not updating display
  • Next by Date: Need help with setNeedsDisplay
  • Previous by thread: Core Data and Undo action names
  • Next by thread: Allowing cancel and progress but not updating display
  • Index(es):
    • Date
    • Thread