Inherits from NSObject
Declared in SCPropertyDefinition.h

Overview

This class functions as a property definition for SCDataDefinition.

Every property definition should set a property type that determines which user interface element should be generated for the property. In addition, the generated user interface element can be further customized using the property’s attributes.

Tasks

Creation and Initialization

Configuration

  •   ownerDataStuctureDefinition

    The owner data structure definition of the property definition.

    property
  •   name

    The name of the property associated with the property definition.

    property
  •   title

    The title of the property. Property titles are used by user interface elements to generate labels associated with the generated controls.

    property
  •   type

    The type of the property. Property types determines which user interface element will be generated for the property.

    property
  •   attributes

    The attibutes set associated with the type of the property. Property attributes gives the user the ability to further customize the user interface element that will be generated for the given property type.

    property
  •   cellActions

    The set of cell action blocks.

    property
  •   editingModeType

    The type of the property while in editing mode. Property types determines which user interface element will be generated for the property while in editing mode.

    property
  •   editingModeAttributes

    The attibutes set associated with the editingModetype of the property. Property attributes gives the user the ability to further customize the user interface element that will be generated for the given property editingModetype.

    property
  •   required

    Set to TRUE if property is a required property. Default: FALSE.

    property
  •   autoValidate

    Set to TRUE if the property value should be automatically validated by the user interface element before commiting it to the property. If the user chooses to provide custom validation using either the cell’s actions, or the model’s SCTableViewModelDelegate, they should set this property to FALSE. Default: TRUE.

    property
  •   existsInNormalMode

    If set to TRUE, a user interface is generated for the property when the owning control is in Normal Mode, otherwise, no UI is generated in that mode. Default: TRUE.

    property
  •   existsInEditingMode

    If set to TRUE, a user interface is generated for the property when the owning control is in Editing Mode, otherwise, no UI is generated in that mode. Default: TRUE.

    property
  •   existsInCreationMode

    If set to TRUE, a user interface is generated for the property when the UI is generated for a newly created object, otherwise, no UI is generated. Default: TRUE.

    property
  •   existsInDetailMode

    If set to TRUE, a user interface is generated for the property when the UI is generated for an existing object, otherwise, no UI is generated. Default: TRUE.

    property

Custom UI

  •   uiElementClass

    The class of the custom user interface element the property will generate. Set this property to override the standard user interface element generated by the property’s ‘type’.

    property
  •   uiElementNibName

    The Nib name of the custom user interface element the property will generate. Set this property to override the standard user interface element generated by the property’s ‘type’.

    property
  •   objectBindings

    This dictionary specifies how each of the uiElementClass or uiElementNibName custom controls binds itself to the definition’s properties. Each dictionary key should be the tag string value of one of the uiElement’s custom controls, and the value should be the name of the definition’s property that is bound to that control.

    property
  •   objectBindingsString

    This string specifies how each of the uiElementClass or uiElementNibName custom controls binds itself to the definition’s properties. The string should consist of a colon separated pair of control’s tag and the property name, while each pair should be separated by a semi-colon.

    property

Internal

  •   dataType

    This property is automatically set by the framework and should never be assigned a value directly.

    property
  •   dataTypeScalar

    Returns TRUE if the property’s dataType is scalar.

    property
  •   dataReadOnly

    This property is automatically set by the framework and should never be assigned a value directly.

    property

Properties

attributes

The attibutes set associated with the type of the property. Property attributes gives the user the ability to further customize the user interface element that will be generated for the given property type.

@property (nonatomic, strong) SCPropertyAttributes *attributes

Declared In

SCPropertyDefinition.h

autoValidate

Set to TRUE if the property value should be automatically validated by the user interface element before commiting it to the property. If the user chooses to provide custom validation using either the cell’s actions, or the model’s SCTableViewModelDelegate, they should set this property to FALSE. Default: TRUE.

@property (nonatomic, readwrite) BOOL autoValidate

Declared In

SCPropertyDefinition.h

cellActions

The set of cell action blocks.

@property (nonatomic, readonly) SCCellActions *cellActions

Declared In

SCPropertyDefinition.h

dataReadOnly

This property is automatically set by the framework and should never be assigned a value directly.

@property (nonatomic, readwrite) BOOL dataReadOnly

Declared In

SCPropertyDefinition.h

dataType

This property is automatically set by the framework and should never be assigned a value directly.

@property (nonatomic, readwrite) SCDataType dataType

Declared In

SCPropertyDefinition.h

dataTypeScalar

Returns TRUE if the property’s dataType is scalar.

@property (nonatomic, readonly) BOOL dataTypeScalar

Declared In

SCPropertyDefinition.h

editingModeAttributes

The attibutes set associated with the editingModetype of the property. Property attributes gives the user the ability to further customize the user interface element that will be generated for the given property editingModetype.

@property (nonatomic, strong) SCPropertyAttributes *editingModeAttributes

Declared In

SCPropertyDefinition.h

editingModeType

The type of the property while in editing mode. Property types determines which user interface element will be generated for the property while in editing mode.

@property (nonatomic, readwrite) SCPropertyType editingModeType

Discussion

Note: If not set (or set to SCPropertyTypeUndefined), the value set in the “type” property is used in editing mode.

Declared In

SCPropertyDefinition.h

existsInCreationMode

If set to TRUE, a user interface is generated for the property when the UI is generated for a newly created object, otherwise, no UI is generated. Default: TRUE.

@property (nonatomic, readwrite) BOOL existsInCreationMode

Declared In

SCPropertyDefinition.h

existsInDetailMode

If set to TRUE, a user interface is generated for the property when the UI is generated for an existing object, otherwise, no UI is generated. Default: TRUE.

@property (nonatomic, readwrite) BOOL existsInDetailMode

Declared In

SCPropertyDefinition.h

existsInEditingMode

If set to TRUE, a user interface is generated for the property when the owning control is in Editing Mode, otherwise, no UI is generated in that mode. Default: TRUE.

@property (nonatomic, readwrite) BOOL existsInEditingMode

Declared In

SCPropertyDefinition.h

existsInNormalMode

If set to TRUE, a user interface is generated for the property when the owning control is in Normal Mode, otherwise, no UI is generated in that mode. Default: TRUE.

@property (nonatomic, readwrite) BOOL existsInNormalMode

Declared In

SCPropertyDefinition.h

name

The name of the property associated with the property definition.

@property (nonatomic, readonly) NSString *name

Declared In

SCPropertyDefinition.h

objectBindings

This dictionary specifies how each of the uiElementClass or uiElementNibName custom controls binds itself to the definition’s properties. Each dictionary key should be the tag string value of one of the uiElement’s custom controls, and the value should be the name of the definition’s property that is bound to that control.

@property (nonatomic, strong) NSDictionary *objectBindings

Discussion

Warning: IMPORTANT: All control tags must be greater than zero.

Note: This property can be used interchangibly with objectBindingsString

Declared In

SCPropertyDefinition.h

objectBindingsString

This string specifies how each of the uiElementClass or uiElementNibName custom controls binds itself to the definition’s properties. The string should consist of a colon separated pair of control’s tag and the property name, while each pair should be separated by a semi-colon.

@property (nonatomic, copy) NSString *objectBindingsString

Discussion

Example bindings string:

NSString *bindingsString = @"1:firstName;2:lastName";

Warning: IMPORTANT: All control tags must be greater than zero.

Note: This property can be used interchangibly with objectBindings

Declared In

SCPropertyDefinition.h

ownerDataStuctureDefinition

The owner data structure definition of the property definition.

@property (nonatomic, unsafe_unretained) SCDataDefinition *ownerDataStuctureDefinition

Discussion

Warning: This property gets set automatically by the framework, you should never set this property manually.

Declared In

SCPropertyDefinition.h

required

Set to TRUE if property is a required property. Default: FALSE.

@property (nonatomic, readwrite) BOOL required

Declared In

SCPropertyDefinition.h

title

The title of the property. Property titles are used by user interface elements to generate labels associated with the generated controls.

@property (nonatomic, copy) NSString *title

Declared In

SCPropertyDefinition.h

type

The type of the property. Property types determines which user interface element will be generated for the property.

@property (nonatomic, readwrite) SCPropertyType type

Declared In

SCPropertyDefinition.h

uiElementClass

The class of the custom user interface element the property will generate. Set this property to override the standard user interface element generated by the property’s ‘type’.

@property (nonatomic, strong) Class uiElementClass

Declared In

SCPropertyDefinition.h

uiElementNibName

The Nib name of the custom user interface element the property will generate. Set this property to override the standard user interface element generated by the property’s ‘type’.

@property (nonatomic, copy) NSString *uiElementNibName

Discussion

Warning: This setting is only applicable for type SCPropertyTypeCustom and will be ignored for all other property types.

Warning: No need to set uiElementClass if ‘uiElementNibName’ contains a valid value.

Declared In

SCPropertyDefinition.h

Class Methods

definitionWithName:

Allocates and returns an initialized ‘SCPropertyDefinition’ given a property name.

+ (id)definitionWithName:(NSString *)propertyName

Parameters

propertyName

The name of the property.

Declared In

SCPropertyDefinition.h

definitionWithName:title:type:

Allocates and returns an initialized ‘SCPropertyDefinition’ given a property name, title, and type.

+ (id)definitionWithName:(NSString *)propertyName title:(NSString *)propertyTitle type:(SCPropertyType)propertyType

Parameters

propertyName

The name of the property.

propertyTitle

The title of the property. Property titles are used by user interface elements to generate labels associated with the generated controls.

propertyType

The property type determines which user interface element will be generated for the property.

Declared In

SCPropertyDefinition.h

Instance Methods

initWithName:

Returns an initialized ‘SCPropertyDefinition’ given a property name.

- (id)initWithName:(NSString *)propertyName

Parameters

propertyName

The name of the property.

Declared In

SCPropertyDefinition.h

initWithName:title:type:

Returns an initialized ‘SCPropertyDefinition’ given a property name, title, and type.

- (id)initWithName:(NSString *)propertyName title:(NSString *)propertyTitle type:(SCPropertyType)propertyType

Parameters

propertyName

The name of the property.

propertyTitle

The title of the property. Property titles are used by user interface elements to generate labels associated with the generated controls.

propertyType

The property type determines which user interface element will be generated for the property.

Declared In

SCPropertyDefinition.h