Explorar el Código

FLEXArgumentInputFontsPickerView never through FLEXArgumentInputViewFactory

DaidoujiChen hace 12 años
padre
commit
fdce03170e

+ 2 - 1
Classes/Editing/Argument Input Views/FLEXArgumentInputFontView.m

@@ -9,6 +9,7 @@
 #import "FLEXArgumentInputFontView.h"
 #import "FLEXArgumentInputViewFactory.h"
 #import "FLEXRuntimeUtility.h"
+#import "FLEXArgumentInputFontsPickerView.h"
 
 @interface FLEXArgumentInputFontView ()
 
@@ -23,7 +24,7 @@
 {
     self = [super initWithArgumentTypeEncoding:typeEncoding];
     if (self) {
-        self.fontNameInput = [FLEXArgumentInputViewFactory argumentInputViewForTypeEncoding:FLEXEncodeClass(FLEXArgumentInputFontsPickerView)];
+        self.fontNameInput = [[FLEXArgumentInputFontsPickerView alloc] initWithArgumentTypeEncoding:FLEXEncodeClass(NSString)];
         self.fontNameInput.backgroundColor = self.backgroundColor;
         self.fontNameInput.targetSize = FLEXArgumentInputViewSizeSmall;
         self.fontNameInput.title = @"Font Name:";

+ 0 - 9
Classes/Editing/Argument Input Views/FLEXArgumentInputFontsPickerView.m

@@ -117,13 +117,4 @@
     self.inputTextView.text = self.availableFonts[row];
 }
 
-#pragma mark -
-
-+ (BOOL)supportsObjCType:(const char *)type withCurrentValue:(id)value
-{
-    BOOL supported = type && strcmp(type, FLEXEncodeClass(FLEXArgumentInputFontsPickerView)) == 0;
-    supported = supported || (value && [value isKindOfClass:[FLEXArgumentInputFontsPickerView class]]);
-    return supported;
-}
-
 @end

+ 0 - 3
Classes/Editing/Argument Input Views/FLEXArgumentInputViewFactory.m

@@ -16,7 +16,6 @@
 #import "FLEXArgumentInputStringView.h"
 #import "FLEXArgumentInputFontView.h"
 #import "FLEXArgumentInputColorView.h"
-#import "FLEXArgumentInputFontsPickerView.h"
 
 @implementation FLEXArgumentInputViewFactory
 
@@ -52,8 +51,6 @@
         argumentInputViewSubclass = [FLEXArgumentInputNumberView class];
     } else if ([FLEXArgumentInputJSONObjectView supportsObjCType:typeEncoding withCurrentValue:currentValue]) {
         argumentInputViewSubclass = [FLEXArgumentInputJSONObjectView class];
-    } else if ([FLEXArgumentInputFontsPickerView supportsObjCType:typeEncoding withCurrentValue:currentValue]) {
-        argumentInputViewSubclass = [FLEXArgumentInputFontsPickerView class];
     }
     
     return argumentInputViewSubclass;