• 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: Strange NSManagedObjectContextObjectsDidChangeNotification behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange NSManagedObjectContextObjectsDidChangeNotification behavior


  • Subject: Re: Strange NSManagedObjectContextObjectsDidChangeNotification behavior
  • From: Jerry Krinock <email@hidden>
  • Date: Wed, 25 Feb 2009 08:30:42 -0800


On 2009 Feb 25, at 06:55, Karolis Ramanauskas wrote:

Lesson: Don't change model data in a -draw method. I really can't think of any reason why you'd want to do this. -draw is for drawing.

Yes, perhaps, but I have to change it, perhaps not in a draw method itself, but in another method that get's called before it.

... [input setLocationX: ([self locationX] + ...

Any suggestions?

Is locationY the model attribute which you "have to" change? If so, I suggest that this is not rightfully a model or managed object attribute. Obviously, it's more of a 'view' thing than a 'model' thing. Remove it from your data model. Make it a regular instance variable instead or, better yet, remove it entirely from your model class and calculate it in your view class when you need to draw. Thousands of apps do it that way -- it will work for your app too!


_______________________________________________

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


  • Follow-Ups:
    • Re: Strange NSManagedObjectContextObjectsDidChangeNotification behavior
      • From: Karolis Ramanauskas <email@hidden>
References: 
 >Strange NSManagedObjectContextObjectsDidChangeNotification behavior (From: Karolis Ramanauskas <email@hidden>)
 >Re: Strange NSManagedObjectContextObjectsDidChangeNotification behavior (From: Jerry Krinock <email@hidden>)
 >Re: Strange NSManagedObjectContextObjectsDidChangeNotification behavior (From: Dave Fernandes <email@hidden>)
 >Re: Strange NSManagedObjectContextObjectsDidChangeNotification behavior (From: Karolis Ramanauskas <email@hidden>)
 >Re: Strange NSManagedObjectContextObjectsDidChangeNotification behavior (From: Jerry Krinock <email@hidden>)
 >Re: Strange NSManagedObjectContextObjectsDidChangeNotification behavior (From: Karolis Ramanauskas <email@hidden>)

  • Prev by Date: willAnimateFirstHalfOfRotationToInterfaceOrientation not called...
  • Next by Date: Subclassing with more restrictive initializers
  • Previous by thread: Re: Strange NSManagedObjectContextObjectsDidChangeNotification behavior
  • Next by thread: Re: Strange NSManagedObjectContextObjectsDidChangeNotification behavior
  • Index(es):
    • Date
    • Thread