• 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: How to synchronize my MacOS-X application with Core-Data automatic Undo management?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to synchronize my MacOS-X application with Core-Data automatic Undo management?


  • Subject: Re: How to synchronize my MacOS-X application with Core-Data automatic Undo management?
  • From: Sean McBride <email@hidden>
  • Date: Tue, 26 Aug 2014 11:57:11 -0400
  • Organization: Rogue Research Inc.

On Tue, 26 Aug 2014 16:34:30 +0300, Motti Shneor said:

>In my document NSWindowController, there are two references, to the
>
>@property (atomic, readwrite, weak) NSManagedObject
>*currentDepartment; // and
>@property (atomic, readwrite, weak) NSManagedObject *currentEmployee;
>
>(I know this example calls for using the table or array controller
>selection instead of those references, but my case has no "selection"
>per se. I need those "current" references, to which I apply actions and
>changes as the program runs.)

Instead of raw pointers to the NSManagedObjects as above, you should consider using an NSObjectController intermediary.  'selection' is not the only attribute of an NSObjectController, more importantly, it has a 'content', which you can swap almost as easily as you change your properties above.  NSObjectController has magic to deal with its content object going away and reappearing that will help you.

Cheers,

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada



_______________________________________________

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: 
 >How to synchronize my MacOS-X application with Core-Data automatic Undo management? (From: Motti Shneor <email@hidden>)
 >Re: How to synchronize my MacOS-X application with Core-Data automatic Undo management? (From: Keary Suska <email@hidden>)
 >Re: How to synchronize my MacOS-X application with Core-Data automatic Undo management? (From: Motti Shneor <email@hidden>)

  • Prev by Date: Re: Class Introspection with class_copyMethodList and class methods.
  • Next by Date: Re: Class Introspection with class_copyMethodList and class methods.
  • Previous by thread: Re: How to synchronize my MacOS-X application with Core-Data automatic Undo management?
  • Next by thread: Re: How to synchronize my MacOS-X application with Core-Data automatic Undo management?
  • Index(es):
    • Date
    • Thread