• 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: observeValueForKeyPath:... called too often in macOS 12
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: observeValueForKeyPath:... called too often in macOS 12


  • Subject: Re: observeValueForKeyPath:... called too often in macOS 12
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Wed, 19 Oct 2016 14:49:46 +0700

> On 19 Oct 2016, at 13:01, Quincey Morris <email@hidden> wrote:
>
>
> One way around this is to use a NSObjectController bound between the text field and the data model (user defaults in this case). NSObjectController implements the editor protocols, so this covers the case where the window closes while an edit is in progress. However, IIRC it doesn’t help when a document “save” occurs or when the app quits, for separate reasons.

I am struggling to do so (and failing miserably):

Before:

TextField1 bound Value to:
	Shared User Defaults Controller
	Controller Key = values
	Model Key Path = TextField1

This worked fine.

Now added NSObjectController
	Mode = Class
	Class Name = NSMutableDictionary ??
	not prepares Content
	editable

Bind Controller Content to:
	Shared User Defaults Controller
	Controller Key = values
	Model Key Path = standardUserDefaults ??

TextField1 bound Value to:
	Object Controller
	Controller Key = selection
	Model Key Path = TextField1 ??

This crashes with -[_NSControllerObjectProxy copyWithZone:]: unrecognized selector sent to instance 0x10….

Obviously I am not knowing what to do and am just groping blindly.

How does one put an NSObjectController between an NSTextField and the Shared User Defaults Controller ?

Gerriet.


_______________________________________________

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: observeValueForKeyPath:... called too often in macOS 12
      • From: Quincey Morris <email@hidden>
References: 
 >Re: observeValueForKeyPath:... called too often in macOS 12 (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: observeValueForKeyPath:... called too often in macOS 12 (From: Quincey Morris <email@hidden>)

  • Prev by Date: [NSEditorRegistration sidetrack] observeValueForKeyPath:... called too often in macOS 12
  • Next by Date: Re: observeValueForKeyPath:... called too often in macOS 12
  • Previous by thread: [NSEditorRegistration sidetrack] observeValueForKeyPath:... called too often in macOS 12
  • Next by thread: Re: observeValueForKeyPath:... called too often in macOS 12
  • Index(es):
    • Date
    • Thread