• 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
Can't bind to NSApplication subclass on startup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't bind to NSApplication subclass on startup


  • Subject: Can't bind to NSApplication subclass on startup
  • From: Jonathan Taylor <email@hidden>
  • Date: Wed, 16 Jul 2014 11:13:46 +0100

I’ve been doing quite a major refactor of my code and have just got things back into a compilable/runnable state. Unfortunately I seem to have broken something to do with bindings, and I can’t work out what the problem is. (Is there a way of turning on detailed logging of what’s going on behind the scenes in terms of decisions of what to load, what is binding to what, etc?).

The symptom is the log output pasted at the bottom of this email. However I don’t see why it isn’t understanding that I have a custom subclass of NSApplication (which does expose those actions).

What I know:
Info.plist lists “Principal class” as “SpimApplication”.
MainMenu.xib (which is where these actions are connected from) lists File’s Owner and Application as SpimApplication
Unbinding and rebinding the actions is accepted by Xcode and doesn’t fix the problem
There are some (should-be-unrelated) changes to MainMenu.xib, but reverting that file doesn’t make any difference
No relevant edits to SpimApplication.mm/.h; no edits to Info.plist.
No changes made to project settings; diff on project file shows only addition/removal of a few unrelated files
(Quit and relaunched Xcode just for kicks, and did a clean build. Problem still occurs)
Reverting completely to previous stable version of code makes error go away.


That last finding suggests that I must have changed ~something~, but I cannot imagine what. Googling just revealed a series of discussions where people have made relatively obvious mistakes that I think I have excluded here. Can anybody suggest what the problem might be, or how I could gather more information to help debug it? 

Cheers
Jonny





2014-07-16 10:49:19.429 Spim GUI[43567:303] Could not connect the action saveSnapshot: to target of class NSApplication
2014-07-16 10:49:19.430 Spim GUI[43567:303] Could not connect the action makeMovieFromFolder: to target of class NSApplication
2014-07-16 10:49:19.430 Spim GUI[43567:303] Could not connect the action makeTriggerVideos: to target of class NSApplication
2014-07-16 10:49:19.430 Spim GUI[43567:303] Could not connect the action batchMakeTriggerVideos: to target of class NSApplication
2014-07-16 10:49:19.431 Spim GUI[43567:303] Could not connect the action supervisedAnalysis: to target of class NSApplication
2014-07-16 10:49:19.431 Spim GUI[43567:303] Could not connect the action showStageWindow: to target of class NSApplication
2014-07-16 10:49:19.431 Spim GUI[43567:303] Could not connect the action makeAdvancedMovieFromFolder: to target of class NSApplication
2014-07-16 10:49:19.433 Spim GUI[43567:303] An uncaught exception was raised
2014-07-16 10:49:19.433 Spim GUI[43567:303] [<NSApplication 0x682480> valueForUndefinedKey:]: this class is not key value coding-compliant for the key acquiringVideo.
2014-07-16 10:49:19.436 Spim GUI[43567:303] (
0   CoreFoundation                      0x9878d471 __raiseError + 193
1   libobjc.A.dylib                     0x9af43091 objc_exception_throw + 162
2   CoreFoundation                      0x9878d061 -[NSException raise] + 17
3   Foundation                          0x989e0273 -[NSObject(NSKeyValueCoding) valueForUndefinedKey:] + 282
4   Foundation                          0x988e1566 _NSGetUsingKeyValueGetter + 52
5   Foundation                          0x988e152a -[NSObject(NSKeyValueCoding) valueForKey:] + 406
6   AppKit                              0x9269c678 -[NSApplication(NSScripting) valueForKey:] + 576
7   Foundation                          0x988fb0a5 -[NSObject(NSKeyValueCoding) valueForKeyPath:] + 444
8   AppKit                              0x92454dfd -[NSBinder _valueForKeyPath:ofObject:mode:raisesForNotApplicableKeys:] + 825
9   AppKit                              0x92454a3a -[NSBinder valueForBinding:resolveMarkersToPlaceholders:] + 193
10  AppKit                              0x9245b44d -[NSEditableBinder enabledState] + 70
11  AppKit                              0x9245b3fe -[NSEditableBinder _enabledStateWithMode:] + 109
12  AppKit                              0x9245b0ec -[NSEditableBinder _setStatesImmediatelyInObject:mode:triggerRedisplay:] + 352
13  AppKit                              0x9245af84 -[NSEditableBinder _observeValueForKeyPath:ofObject:context:] + 124
14  AppKit                              0x92453ede -[NSBinder observeValueForKeyPath:ofObject:change:context:] + 566
15  AppKit                              0x92453ca3 -[NSBinder _performConnectionEstablishedRefresh] + 82
16  AppKit                              0x9245208c -[NSBinder establishConnection] + 359
17  AppKit                              0x9244a24f -[NSObject(NSKeyValueBindingCreation) bind:toObject:withKeyPath:options:] + 706
18  AppKit                              0x92594948 -[NSNibBindingConnector establishConnection] + 141
19  AppKit                              0x923a8d80 -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] + 1004
20  AppKit                              0x9239c995 loadNib + 369
21  AppKit                              0x9239bdc1 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 320
22  AppKit                              0x9239bb8f -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] + 256
23  AppKit                              0x9239b91c +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 418
24  AppKit                              0x92396d89 NSApplicationMain + 510
25  Spim GUI                            0x00002935 start + 53
)
2014-07-16 10:49:19.442 Spim GUI[43567:303] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<NSApplication 0x682480> valueForUndefinedKey:]: this class is not key value coding-compliant for the key acquiringVideo.'
*** Call stack at first throw:
(
0   CoreFoundation                      0x9878d471 __raiseError + 193
1   libobjc.A.dylib                     0x9af43091 objc_exception_throw + 162
2   CoreFoundation                      0x9878d061 -[NSException raise] + 17
3   Foundation                          0x989e0273 -[NSObject(NSKeyValueCoding) valueForUndefinedKey:] + 282
4   Foundation                          0x988e1566 _NSGetUsingKeyValueGetter + 52
5   Foundation                          0x988e152a -[NSObject(NSKeyValueCoding) valueForKey:] + 406
6   AppKit                              0x9269c678 -[NSApplication(NSScripting) valueForKey:] + 576
7   Foundation                          0x988fb0a5 -[NSObject(NSKeyValueCoding) valueForKeyPath:] + 444
8   AppKit                              0x92454dfd -[NSBinder _valueForKeyPath:ofObject:mode:raisesForNotApplicableKeys:] + 825
9   AppKit                              0x92454a3a -[NSBinder valueForBinding:resolveMarkersToPlaceholders:] + 193
10  AppKit                              0x9245b44d -[NSEditableBinder enabledState] + 70
11  AppKit                              0x9245b3fe -[NSEditableBinder _enabledStateWithMode:] + 109
12  AppKit                              0x9245b0ec -[NSEditableBinder _setStatesImmediatelyInObject:mode:triggerRedisplay:] + 352
13  AppKit                              0x9245af84 -[NSEditableBinder _observeValueForKeyPath:ofObject:context:] + 124
14  AppKit                              0x92453ede -[NSBinder observeValueForKeyPath:ofObject:change:context:] + 566
15  AppKit                              0x92453ca3 -[NSBinder _performConnectionEstablishedRefresh] + 82
16  AppKit                              0x9245208c -[NSBinder establishConnection] + 359
17  AppKit                              0x9244a24f -[NSObject(NSKeyValueBindingCreation) bind:toObject:withKeyPath:options:] + 706
18  AppKit                              0x92594948 -[NSNibBindingConnector establishConnection] + 141
19  AppKit                              0x923a8d80 -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] + 1004
20  AppKit                              0x9239c995 loadNib + 369
21  AppKit                              0x9239bdc1 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 320
22  AppKit                              0x9239bb8f -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] + 256
23  AppKit                              0x9239b91c +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 418
24  AppKit                              0x92396d89 NSApplicationMain + 510
25  Spim GUI                            0x00002935 start + 53
)
(lldb) 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Can't bind to NSApplication subclass on startup
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: viewDidLoad not called
  • Next by Date: Re: Can't bind to NSApplication subclass on startup
  • Previous by thread: Re: viewDidLoad not called
  • Next by thread: Re: Can't bind to NSApplication subclass on startup
  • Index(es):
    • Date
    • Thread