Created
September 17, 2008 20:27
-
-
Save boucher/11301 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/AppKit/CPTextField.j b/AppKit/CPTextField.j | |
index 2737de9..6e2c32d 100644 | |
--- a/AppKit/CPTextField.j | |
+++ b/AppKit/CPTextField.j | |
@@ -468,7 +468,8 @@ var _CPTextFieldSquareBezelColor = nil; | |
var CPTextFieldIsSelectableKey = @"CPTextFieldIsSelectableKey", | |
CPTextFieldLineBreakModeKey = @"CPTextFieldLineBreakModeKey", | |
- CPTextFieldStringValueKey = @"CPTextFieldStringValueKey"; | |
+ CPTextFieldStringValueKey = @"CPTextFieldStringValueKey", | |
+ CPTextFieldIsEditableKey = @"CPTextFieldIsEditableKey"; | |
@implementation CPTextField (CPCoding) | |
@@ -503,6 +504,7 @@ var CPTextFieldIsSelectableKey = @"CPTextFieldIsSelectableKey", | |
_DOMElement.appendChild(_DOMTextElement); | |
#endif | |
+ [self setEditable:[aCoder decodeBoolForKey:CPTextFieldIsEditableKey]]; | |
[self setSelectable:[aCoder decodeBoolForKey:CPTextFieldIsSelectableKey]]; | |
[self setLineBreakMode:[aCoder decodeIntForKey:CPTextFieldLineBreakModeKey]]; | |
@@ -526,6 +528,8 @@ var CPTextFieldIsSelectableKey = @"CPTextFieldIsSelectableKey", | |
[aCoder encodeInt:_lineBreakMode forKey:CPTextFieldLineBreakModeKey]; | |
[aCoder encodeObject:_value forKey:CPTextFieldStringValueKey]; | |
+ | |
+ [aCoder encodeBool:_isEditable forKey:CPTextFieldIsEditableKey]; | |
} | |
@end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment