aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPFieldEditorController.h30
-rw-r--r--Source/SPFieldEditorController.m44
2 files changed, 29 insertions, 45 deletions
diff --git a/Source/SPFieldEditorController.h b/Source/SPFieldEditorController.h
index fbf04c49..ec36c9d2 100644
--- a/Source/SPFieldEditorController.h
+++ b/Source/SPFieldEditorController.h
@@ -195,6 +195,31 @@
@property(readwrite, retain) NSDictionary *editedFieldInfo;
+//don't blame me for nonatomic,assign. That's how the previous setters worked :)
+
+/**
+ * The maximum text length of the underlying table field for input validation.
+ */
+@property(nonatomic,assign) unsigned long long textMaxLength;
+
+/**
+ * The field type of the underlying table field for input validation.
+ * The field type will be used for dispatching which sheet will be shown.
+ * If type == BIT the bitSheet will be used otherwise the editSheet.
+ */
+@property(nonatomic,assign) NSString *fieldType;
+
+/**
+ * The field encoding of the underlying table field for displaying it to the user.
+ */
+@property(nonatomic,assign) NSString *fieldEncoding;
+
+/**
+ * Whether underlying table field allows NULL for several validations.
+ * If allowNULL is YES NULL value is allowed for the underlying table field.
+ */
+@property(nonatomic,assign) BOOL allowNULL;
+
- (IBAction)closeEditSheet:(id)sender;
- (IBAction)openEditSheet:(id)sender;
- (void)openPanelDidEnd:(NSOpenPanel *)panel returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;
@@ -215,11 +240,6 @@
isObjectBlob:(BOOL)isFieldBlob isEditable:(BOOL)isEditable withWindow:(NSWindow *)theWindow
sender:(id)sender contextInfo:(NSDictionary*)theContextInfo;
-- (void)setTextMaxLength:(NSUInteger)length;
-- (void)setFieldType:(NSString*)aType;
-- (void)setFieldEncoding:(NSString*)aEncoding;
-- (void)setAllowNULL:(BOOL)allowNULL;
-
- (void)processPasteImageData;
- (void)processUpdatedImageData:(NSData *)data;
diff --git a/Source/SPFieldEditorController.m b/Source/SPFieldEditorController.m
index 52242406..c1908a19 100644
--- a/Source/SPFieldEditorController.m
+++ b/Source/SPFieldEditorController.m
@@ -49,6 +49,10 @@
@implementation SPFieldEditorController
@synthesize editedFieldInfo;
+@synthesize textMaxLength = maxTextLength;
+@synthesize fieldType;
+@synthesize fieldEncoding;
+@synthesize allowNULL = _allowNULL;
/**
* Initialise an instance of SPFieldEditorController using the XIB “FieldEditorSheet.xib”. Init the available Quciklook format by reading
@@ -483,46 +487,6 @@
}
/**
- * Set the maximum text length of the underlying table field for input validation.
- *
- * @param length The maximum text length
- */
-- (void)setTextMaxLength:(NSUInteger)length
-{
- maxTextLength = length;
-}
-
-/**
- * Set the field type of the underlying table field for input validation.
- *
- * @param aType The field type which will be used for dispatching which sheet will be shown. If type == BIT the bitSheet will be used otherwise the editSheet.
- */
-- (void)setFieldType:(NSString*)aType
-{
- fieldType = aType;
-}
-
-/**
- * Set the field encoding of the underlying table field for displaying it to the user.
- *
- * @param aEncoding encoding
- */
-- (void)setFieldEncoding:(NSString*)aEncoding
-{
- fieldEncoding = aEncoding;
-}
-
-/**
- * Set if underlying table field allows NULL for several validations.
- *
- * @param allowNULL If allowNULL is YES NULL value is allowed for the underlying table field
- */
-- (void)setAllowNULL:(BOOL)allowNULL
-{
- _allowNULL = allowNULL;
-}
-
-/**
* Segement controller for text/image/hex buttons in editSheet
*/
- (IBAction)segmentControllerChanged:(id)sender