 root.ImageButton_Framework = class ImageButton_Framework
   constructor:(options = {}) ->
-    options = root._.extend({
+    @options = root._.extend({
       type: "flat"
       onClick: () => Ti.API.info("button clicked")
       backgroundColor: "transparent"
+      enabled: true
     }, options)
     
     @bg = ""
     @bgPressed = ""
     
-    if options.type == "back"
-      @view = @createBackButton(options)
+    if @options.type == "back"
+      @view = @createBackButton(@options)
     else
-      @view = @createButton(options)
+      @view = @createButton(@options)
     
   createBackButton: (settings) =>
     @bg = "/Common/Framework/Images/iOS/TitleBar/Buttons/back.png"

      })
      @button.add(@label)

    @button.addEventListener("touchstart", () => @button.backgroundImage = @bgPressed)
    @button.addEventListener("touchend", () => 
      settings.onClick()
      @button.backgroundImage = @bg if !@button.isPressed
    )
    @button

  createButton: (settings) =>

      })
      @button.add(@label)

    @setEnabled(settings.enabled)
    
    @button
    
  setTitle: (title) =>
    @label.text = title
