Преглед изворни кода

Rename FLEXArgumentInputView’s inputOutput property to inputValue.

Sounds nicer.
Ryan Olson пре 12 година
родитељ
комит
d38680dc95

+ 3 - 3
Classes/Editing/Argument Input Views/FLEXArgumentInputJSONObjectView.m

@@ -22,12 +22,12 @@
     return self;
 }
 
-- (void)setInputOutput:(id)inputOutput
+- (void)setInputValue:(id)inputValue
 {
-    self.inputTextView.text = [FLEXRuntimeUtility editableJSONStringForObject:inputOutput];
+    self.inputTextView.text = [FLEXRuntimeUtility editableJSONStringForObject:inputValue];
 }
 
-- (id)inputOutput
+- (id)inputValue
 {
     return [FLEXRuntimeUtility objectValueFromEditableJSONString:self.inputTextView.text];
 }

+ 4 - 4
Classes/Editing/Argument Input Views/FLEXArgumentInputNumberView.m

@@ -20,14 +20,14 @@
     return self;
 }
 
-- (void)setInputOutput:(id)inputOutput
+- (void)setInputValue:(id)inputValue
 {
-    if ([inputOutput respondsToSelector:@selector(stringValue)]) {
-        self.inputTextView.text = [inputOutput stringValue];
+    if ([inputValue respondsToSelector:@selector(stringValue)]) {
+        self.inputTextView.text = [inputValue stringValue];
     }
 }
 
-- (id)inputOutput
+- (id)inputValue
 {
     return [FLEXRuntimeUtility valueForNumberWithObjCType:self.typeEncoding fromInputString:self.inputTextView.text];
 }

+ 1 - 1
Classes/Editing/Argument Input Views/FLEXArgumentInputView.h

@@ -24,7 +24,7 @@ typedef NS_ENUM(NSUInteger, FLEXArgumentInputViewSize) {
 /// To reteive the value input by the user, access the property.
 /// Primitive types and structs should/will be boxed in NSValue containers.
 /// Concrete subclasses *must* override both the setter and getter for this property.
-@property (nonatomic) id inputOutput;
+@property (nonatomic) id inputValue;
 
 /// Setting this value to large will make some argument input views increase the size of their input field(s).
 /// Useful to increase the use of space if there is only one input view on screen (i.e. for property and ivar editing).

+ 2 - 2
Classes/Editing/Argument Input Views/FLEXArgumentInputView.m

@@ -73,12 +73,12 @@
     return NO;
 }
 
-- (void)setInputOutput:(id)inputOutput
+- (void)setInputValue:(id)inputValue
 {
     // Subclasses should override.
 }
 
-- (id)inputOutput
+- (id)inputValue
 {
     // Subclasses should override.
     return nil;

+ 3 - 3
Classes/Editing/FLEXDefaultEditorViewController.m

@@ -45,7 +45,7 @@
     FLEXArgumentInputView *inputView = [FLEXArgumentInputViewFactory argumentInputViewForTypeEncoding:@encode(id)];
     inputView.backgroundColor = self.view.backgroundColor;
     inputView.targetSize = FLEXArgumentInputViewSizeLarge;
-    inputView.inputOutput = [self.defaults objectForKey:self.key];
+    inputView.inputValue = [self.defaults objectForKey:self.key];
     self.fieldEditorView.argumentInputViews = @[inputView];
 }
 
@@ -53,7 +53,7 @@
 {
     [super actionButtonPressed:sender];
     
-    id value = self.firstInputView.inputOutput;
+    id value = self.firstInputView.inputValue;
     if (value) {
         [self.defaults setObject:value forKey:self.key];
     } else {
@@ -61,7 +61,7 @@
     }
     [self.defaults synchronize];
 
-    self.firstInputView.inputOutput = [self.defaults objectForKey:self.key];
+    self.firstInputView.inputValue = [self.defaults objectForKey:self.key];
 }
 
 + (BOOL)canEditDefaultWithValue:(id)currentValue

+ 3 - 3
Classes/Editing/FLEXIvarEditorViewController.m

@@ -39,7 +39,7 @@
     FLEXArgumentInputView *inputView = [FLEXArgumentInputViewFactory argumentInputViewForTypeEncoding:ivar_getTypeEncoding(self.ivar)];
     inputView.backgroundColor = self.view.backgroundColor;
     inputView.targetSize = FLEXArgumentInputViewSizeLarge;
-    inputView.inputOutput = [FLEXRuntimeUtility valueForIvar:self.ivar onObject:self.target];
+    inputView.inputValue = [FLEXRuntimeUtility valueForIvar:self.ivar onObject:self.target];
     self.fieldEditorView.argumentInputViews = @[inputView];
 }
 
@@ -47,8 +47,8 @@
 {
     [super actionButtonPressed:sender];
     
-    [FLEXRuntimeUtility setValue:self.firstInputView.inputOutput forIvar:self.ivar onObject:self.target];
-    self.firstInputView.inputOutput = [FLEXRuntimeUtility valueForIvar:self.ivar onObject:self.target];
+    [FLEXRuntimeUtility setValue:self.firstInputView.inputValue forIvar:self.ivar onObject:self.target];
+    self.firstInputView.inputValue = [FLEXRuntimeUtility valueForIvar:self.ivar onObject:self.target];
 }
 
 + (BOOL)canEditIvar:(Ivar)ivar currentValue:(id)value

+ 1 - 1
Classes/Editing/FLEXMethodCallingViewController.m

@@ -70,7 +70,7 @@
     
     NSMutableArray *arguments = [NSMutableArray array];
     for (FLEXArgumentInputView *inputView in self.fieldEditorView.argumentInputViews) {
-        id argumentValue = inputView.inputOutput;
+        id argumentValue = inputView.inputValue;
         if (!argumentValue) {
             // Use NSNulls as placeholders in the array. They will be interpreted as nil arguments.
             argumentValue = [NSNull null];

+ 3 - 3
Classes/Editing/FLEXPropertyEditorViewController.m

@@ -42,7 +42,7 @@
     FLEXArgumentInputView *inputView = [FLEXArgumentInputViewFactory argumentInputViewForTypeEncoding:typeEncoding];
     inputView.backgroundColor = self.view.backgroundColor;
     inputView.targetSize = FLEXArgumentInputViewSizeLarge;
-    inputView.inputOutput = [FLEXRuntimeUtility valueForProperty:self.property onObject:self.target];
+    inputView.inputValue = [FLEXRuntimeUtility valueForProperty:self.property onObject:self.target];
     self.fieldEditorView.argumentInputViews = @[inputView];
 }
 
@@ -50,12 +50,12 @@
 {
     [super actionButtonPressed:sender];
     
-    id userInputObject = self.firstInputView.inputOutput;
+    id userInputObject = self.firstInputView.inputValue;
     NSArray *arguments = userInputObject ? @[userInputObject] : nil;
     SEL setterSelector = [FLEXRuntimeUtility setterSelectorForProperty:self.property];
     [FLEXRuntimeUtility performSelector:setterSelector onObject:self.target withArguments:arguments error:NULL];
     
-    self.firstInputView.inputOutput = [FLEXRuntimeUtility valueForProperty:self.property onObject:self.target];
+    self.firstInputView.inputValue = [FLEXRuntimeUtility valueForProperty:self.property onObject:self.target];
 }
 
 + (BOOL)canEditProperty:(objc_property_t)property currentValue:(id)value