 
         # Triggered any time the control contents have changed. Upstream, the
         # context can be bound to this event and update itself as changes
-        # occur. The small timer is prevent chatty typing
-        change: (event) =>
+        # occur.
+        change: (event) ->
             @trigger 'change', @, @get()
-
 
         getField: ->
         getOperator: ->



    controlOptions = ['attrNames', 'dataAttrs', 'dataSelectors', 'regions',
        'regionViews', 'attrGetters', 'attrSetters']


    # Control interface, this should not be used directly
    class Control extends c.Marionette.Layout
        className: 'control'

        attrNames: ['field', 'operator', 'value', 'nulls']

        regions:
            field: '.control-field'
            operator: '.control-operator'
            value: '.control-value'
            nulls: '.control-nulls'

        regionViews: {}

        regionOptions: {}

        dataAttrs:
            field: 'data-field'
            operator: 'data-operator'
            value: 'data-value'
            nulls: 'data-nulls'

        dataSelectors:
            field: '[data-field]'
            operator: '[data-operator]'
            value: '[data-value]'
            nulls: '[data-nulls]'

        attrGetters:
            field: 'getField'

        setNulls: ->


    # Control interface, this should not be used directly
    class Control extends c.Marionette.Layout
        className: 'control'

        regions:
            field: '.control-field'
            operator: '.control-operator'
            value: '.control-value'
            nulls: '.control-nulls'

        regionViews: {}

        regionOptions: {}

        dataAttrs:
            field: 'data-field'
            operator: 'data-operator'
            value: 'data-value'
            nulls: 'data-nulls'

        dataSelectors:
            field: '[data-field]'
            operator: '[data-operator]'
            value: '[data-value]'
            nulls: '[data-nulls]'

        constructor: ->
            super
            @mergeOptions(@options)
            @bindContext(@options.context)

        onRender: ->
            for key, klass of c._.result @, 'regionViews'
                inputAttrs = {}
                inputAttrs[@dataAttrs[key]] = ''

                options = c._.extend {}, c._.result(@regionOptions, key),
                    inputAttrs: inputAttrs
                    model: @model

                @[key].show new klass(options)

            @set(@context)


    c._.defaults Control::, ControlViewMixin


    { Control, ControlViewMixin }
