Hallo,
ich habe das slider-textfeld-Objectcontroller Schema. slider und textfeld sind per Value an OC.selection.number gebunden, somit sind beide synchron - funktioniert einwandfrei. Jetzt habe ich im File's Owner eine Property (Dictionary bzw. mutableDictionary) key="@number", value=NSNumber. ObjectController content ist an die Property gebunden. Setzte ich jetzt einen Wert, dann wird der auch im Textfeld und im Slider angezeigt, wackel ich aber am slider oder gebe was ins Textfeld ein, dann schmiert es ab.
2015-08-09 21:40:21.569 NewSybase[2936:659161] Error setting value for key path selection.number of object <NSObjectController: 0x618000121360>[object class: NSMutableDictionary] (from bound object <NSSlider: 0x610000140bb0>): [<__NSDictionaryI 0x60000007ba40> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key number.
2015-08-09 21:40:21.571 NewSybase[2936:659161] (
0 CoreFoundation 0x00007fff90e2903c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff91e9076e objc_exception_throw + 43
2 CoreFoundation 0x00007fff90e28e1a +[NSException raise:format:arguments:] + 106
3 AppKit 0x00007fff8d074145 -[NSBinder _setValue:forKeyPath:ofObject:mode:validateImmediately:raisesForNotApplicableKeys:error:] + 841
4 AppKit 0x00007fff8d073da3 -[NSBinder setValue:forBinding:error:] + 248
5 AppKit 0x00007fff8d504b00 -[NSValueBinder _applyObjectValue:forBinding:canRecoverFromErrors:handleErrors:typeOfAlert:discardEditingCallback:otherCallback:callbackContextInfo:didRunAlert:] + 220
6 AppKit 0x00007fff8d504e4e -[NSValueBinder applyDisplayedValueHandleErrors:typeOfAlert:canRecoverFromErrors:discardEditingCallback:otherCallback:callbackContextInfo:didRunAlert:error:] + 566
7 AppKit 0x00007fff8d07366a -[NSValueBinder performAction:] + 291
8 AppKit 0x00007fff8d073431 -[_NSBindingAdaptor _objectDidTriggerAction:bindingAdaptor:] + 131
9 AppKit 0x00007fff8cfbc928 -[NSControl sendAction:to:] + 56
10 AppKit 0x00007fff8cfbc862 __26-[NSCell _sendActionFrom:]_block_invoke + 131
11 libsystem_trace.dylib 0x00007fff98ae3cd7 _os_activity_initiate + 75
12 AppKit 0x00007fff8cfbc7bf -[NSCell _sendActionFrom:] + 144
13 AppKit 0x00007fff8d0c9d86 __48-[NSCell trackMouse:inRect:ofView:untilMouseUp:]_block_invoke + 219
14 libsystem_trace.dylib 0x00007fff98ae3cd7 _os_activity_initiate + 75
15 AppKit 0x00007fff8cfba6f0 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 1346
16 AppKit 0x00007fff8d106b61 -[NSSliderCell trackMouse:inRect:ofView:untilMouseUp:] + 825
17 AppKit 0x00007fff8cfb9366 -[NSControl mouseDown:] + 714
18 AppKit 0x00007fff8d5232dc -[NSWindow _reallySendEvent:isDelayedEvent:] + 14125
19 AppKit 0x00007fff8ceb2c86 -[NSWindow sendEvent:] + 470
20 AppKit 0x00007fff8ceaf212 -[NSApplication sendEvent:] + 2504
21 AppKit 0x00007fff8cdd8b68 -[NSApplication run] + 711
22 AppKit 0x00007fff8cd55244 NSApplicationMain + 1832
23 NewSybase 0x0000000100001212 main + 34
24 libdyld.dylib 0x00007fff8b7cd5c9 start + 1
25 ??? 0x0000000000000003 0x0 + 3
)
Habe ich einen Denkfehler oder geht so eine Dreieckskonstellation gar nicht?
Gruß fiveyears
ich habe das slider-textfeld-Objectcontroller Schema. slider und textfeld sind per Value an OC.selection.number gebunden, somit sind beide synchron - funktioniert einwandfrei. Jetzt habe ich im File's Owner eine Property (Dictionary bzw. mutableDictionary) key="@number", value=NSNumber. ObjectController content ist an die Property gebunden. Setzte ich jetzt einen Wert, dann wird der auch im Textfeld und im Slider angezeigt, wackel ich aber am slider oder gebe was ins Textfeld ein, dann schmiert es ab.
2015-08-09 21:40:21.569 NewSybase[2936:659161] Error setting value for key path selection.number of object <NSObjectController: 0x618000121360>[object class: NSMutableDictionary] (from bound object <NSSlider: 0x610000140bb0>): [<__NSDictionaryI 0x60000007ba40> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key number.
2015-08-09 21:40:21.571 NewSybase[2936:659161] (
0 CoreFoundation 0x00007fff90e2903c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff91e9076e objc_exception_throw + 43
2 CoreFoundation 0x00007fff90e28e1a +[NSException raise:format:arguments:] + 106
3 AppKit 0x00007fff8d074145 -[NSBinder _setValue:forKeyPath:ofObject:mode:validateImmediately:raisesForNotApplicableKeys:error:] + 841
4 AppKit 0x00007fff8d073da3 -[NSBinder setValue:forBinding:error:] + 248
5 AppKit 0x00007fff8d504b00 -[NSValueBinder _applyObjectValue:forBinding:canRecoverFromErrors:handleErrors:typeOfAlert:discardEditingCallback:otherCallback:callbackContextInfo:didRunAlert:] + 220
6 AppKit 0x00007fff8d504e4e -[NSValueBinder applyDisplayedValueHandleErrors:typeOfAlert:canRecoverFromErrors:discardEditingCallback:otherCallback:callbackContextInfo:didRunAlert:error:] + 566
7 AppKit 0x00007fff8d07366a -[NSValueBinder performAction:] + 291
8 AppKit 0x00007fff8d073431 -[_NSBindingAdaptor _objectDidTriggerAction:bindingAdaptor:] + 131
9 AppKit 0x00007fff8cfbc928 -[NSControl sendAction:to:] + 56
10 AppKit 0x00007fff8cfbc862 __26-[NSCell _sendActionFrom:]_block_invoke + 131
11 libsystem_trace.dylib 0x00007fff98ae3cd7 _os_activity_initiate + 75
12 AppKit 0x00007fff8cfbc7bf -[NSCell _sendActionFrom:] + 144
13 AppKit 0x00007fff8d0c9d86 __48-[NSCell trackMouse:inRect:ofView:untilMouseUp:]_block_invoke + 219
14 libsystem_trace.dylib 0x00007fff98ae3cd7 _os_activity_initiate + 75
15 AppKit 0x00007fff8cfba6f0 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 1346
16 AppKit 0x00007fff8d106b61 -[NSSliderCell trackMouse:inRect:ofView:untilMouseUp:] + 825
17 AppKit 0x00007fff8cfb9366 -[NSControl mouseDown:] + 714
18 AppKit 0x00007fff8d5232dc -[NSWindow _reallySendEvent:isDelayedEvent:] + 14125
19 AppKit 0x00007fff8ceb2c86 -[NSWindow sendEvent:] + 470
20 AppKit 0x00007fff8ceaf212 -[NSApplication sendEvent:] + 2504
21 AppKit 0x00007fff8cdd8b68 -[NSApplication run] + 711
22 AppKit 0x00007fff8cd55244 NSApplicationMain + 1832
23 NewSybase 0x0000000100001212 main + 34
24 libdyld.dylib 0x00007fff8b7cd5c9 start + 1
25 ??? 0x0000000000000003 0x0 + 3
)
Habe ich einen Denkfehler oder geht so eine Dreieckskonstellation gar nicht?
Gruß fiveyears