KerberosAgent bindings causing crashes
authorJustin Anderson <jander@mit.edu>
Fri, 31 Oct 2008 19:37:18 +0000 (19:37 +0000)
committerJustin Anderson <jander@mit.edu>
Fri, 31 Oct 2008 19:37:18 +0000 (19:37 +0000)
Attempting to fix a hard to reproduce bug with bindings by handling not applicable keys a little better.

ticket: new

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20945 dc483132-0cff-0310-8789-dd5450dbe970

src/kim/agent/mac/AuthenticationController.m
src/kim/agent/mac/SelectIdentityController.m
src/kim/agent/mac/resources/English.lproj/SelectIdentity.xib

index 8df6396fef022cc1c1f977b64b59cf9de44ba362..ea94d6b5b4b1a424626d0049e092dfc268671cd4 100644 (file)
             [glueController setValue:[NSNumber numberWithBool:valid] 
                           forKeyPath:change_password_ok_keypath];
         }
+        else {
+            [super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
+        }
     }
     else {
         [super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
index 9f9addaf37ff7decf4dce2a214e334864c70ff23..b89e698da3529ed4190bdbf3150d23c4e92dddbd 100644 (file)
@@ -41,7 +41,7 @@
 
 - (void) dealloc
 {
-    [identityOptionsController removeObserver:self forKeyPath:uses_default_options_keypath];
+    [identityOptionsController removeObserver:self forKeyPath:identity_string_keypath];
     [refreshTimer release];
     [identities release];
     [super dealloc];
@@ -95,6 +95,9 @@
         [identityOptionsController setValue:[NSNumber numberWithBool:enabled] 
                                  forKeyPath:@"content.canClickOK"];
     }
+    else {
+        [super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
+    }
 }
 
 // ---------------------------------------------------------------------------
index 1a5ff962ee26f321ba9cc0ef148b46b9b4949442..8be14fb6cf8495e10c9863b73e835c092ebbc57d 100644 (file)
                                        <string>usesDefaultTicketOptions</string>
                                </object>
                                <bool key="NSEditable">YES</bool>
+                               <bool key="NSAutomaticallyPreparesContent">YES</bool>
                                <object class="_NSManagedProxy" key="_NSManagedProxy"/>
                        </object>
                        <object class="NSObjectController" id="252123121">
                                        <string>favorite</string>
                                        <string>identities</string>
                                        <string>minRenewableLifetime</string>
+                                       <string>content.identities</string>
                                </object>
                                <string key="NSObjectClassName">Identities</string>
                                <object class="_NSManagedProxy" key="_NSManagedProxy"/>
                                        </object>
                                        <int key="connectionID">300442</int>
                                </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBBindingConnection" key="connection">
-                                               <string key="label">contentArray: selection.identities</string>
-                                               <reference key="source" ref="333357907"/>
-                                               <reference key="destination" ref="1031761104"/>
-                                               <object class="NSNibBindingConnector" key="connector">
-                                                       <reference key="NSSource" ref="333357907"/>
-                                                       <reference key="NSDestination" ref="1031761104"/>
-                                                       <string key="NSLabel">contentArray: selection.identities</string>
-                                                       <string key="NSBinding">contentArray</string>
-                                                       <string key="NSKeyPath">selection.identities</string>
-                                                       <int key="NSNibBindingConnectorVersion">2</int>
-                                               </object>
-                                       </object>
-                                       <int key="connectionID">300444</int>
-                               </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBActionConnection" key="connection">
                                                <string key="label">newIdentity:</string>
                                        </object>
                                        <int key="connectionID">300509</int>
                                </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBBindingConnection" key="connection">
-                                               <string key="label">enabled: selection.canClickOK</string>
-                                               <reference key="source" ref="932240937"/>
-                                               <reference key="destination" ref="196152721"/>
-                                               <object class="NSNibBindingConnector" key="connector">
-                                                       <reference key="NSSource" ref="932240937"/>
-                                                       <reference key="NSDestination" ref="196152721"/>
-                                                       <string key="NSLabel">enabled: selection.canClickOK</string>
-                                                       <string key="NSBinding">enabled</string>
-                                                       <string key="NSKeyPath">selection.canClickOK</string>
-                                                       <int key="NSNibBindingConnectorVersion">2</int>
-                                               </object>
-                                       </object>
-                                       <int key="connectionID">300510</int>
-                               </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBOutletConnection" key="connection">
                                                <string key="label">identityTableScrollView</string>
                                        </object>
                                        <int key="connectionID">300536</int>
                                </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">contentArray: content.identities</string>
+                                               <reference key="source" ref="333357907"/>
+                                               <reference key="destination" ref="1031761104"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="333357907"/>
+                                                       <reference key="NSDestination" ref="1031761104"/>
+                                                       <string key="NSLabel">contentArray: content.identities</string>
+                                                       <string key="NSBinding">contentArray</string>
+                                                       <string key="NSKeyPath">content.identities</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">300539</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">enabled: selection.canClickOK</string>
+                                               <reference key="source" ref="932240937"/>
+                                               <reference key="destination" ref="196152721"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="932240937"/>
+                                                       <reference key="NSDestination" ref="196152721"/>
+                                                       <string key="NSLabel">enabled: selection.canClickOK</string>
+                                                       <string key="NSBinding">enabled</string>
+                                                       <string key="NSKeyPath">selection.canClickOK</string>
+                                                       <object class="NSDictionary" key="NSOptions">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <string>NSMultipleValuesPlaceholder</string>
+                                                                       <string>NSNoSelectionPlaceholder</string>
+                                                                       <string>NSNotApplicablePlaceholder</string>
+                                                                       <string>NSNullPlaceholder</string>
+                                                                       <string>NSRaisesForNotApplicableKeys</string>
+                                                               </object>
+                                                               <object class="NSMutableArray" key="dict.values">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <integer value="0" id="8"/>
+                                                                       <reference ref="8"/>
+                                                                       <reference ref="8"/>
+                                                                       <reference ref="8"/>
+                                                                       <integer value="0"/>
+                                                               </object>
+                                                       </object>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">300546</int>
+                               </object>
                        </object>
                        <object class="IBMutableOrderedSet" key="objectRecords">
                                <object class="NSArray" key="orderedObjects">
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>{{495, 457}, {500, 273}}</string>
                                        <reference ref="9"/>
-                                       <integer value="0"/>
+                                       <reference ref="75542549"/>
                                        <string>{{503, 256}, {419, 465}}</string>
                                        <reference ref="9"/>
                                        <reference ref="9"/>
                                </object>
                        </object>
                        <nil key="sourceID"/>
-                       <int key="maxID">300536</int>
+                       <int key="maxID">300546</int>
                </object>
                <object class="IBClassDescriber" key="IBDocument.Classes">
                        <object class="NSMutableArray" key="referencedPartialClassDescriptions">
                                                        <string>editOptions:</string>
                                                        <string>newIdentity:</string>
                                                        <string>removeFromFavorites:</string>
-                                                       <string>resetOptions:</string>
                                                        <string>select:</string>
                                                        <string>sliderDidChange:</string>
                                                        <string>toggleOptionsVisibility:</string>
                                                        <string>id</string>
                                                        <string>id</string>
                                                        <string>id</string>
-                                                       <string>id</string>
                                                </object>
                                        </object>
                                        <object class="NSMutableDictionary" key="outlets">