 
     class_mixer(Calculator)
 
-    class LogicController
-      initialize: (@expression)->
-        @current_expression = @expression.build()
-
-      onResultChange: ((@handler)->)
-
-      calculate: ->
-        @resetIfError()
-        @current_expression.calculate()
-        @display()
-
-      resetIfError: ->
-        @current_expression.isError() && @current_expression.reset()
-
-      numberClick: ->
-      msg: (part)->
-        @resetIfError()
-        if part.invoke
-          part.invoke(@current_expression)
-        else
-          @current_expression.msg(part)
-        @display()
-
-
-      reset: ->
-        @current_expression.reset()
-        @display()
-
-      buttonPressed: (component)->
-        component.action(@current_expression)
-        @display()
-
-    class_mixer(LogicController)
+    # class LogicController
+    #   initialize: (@expression)->
+    #     @current_expression = @expression.build()
+
+    #   onResultChange: ((@handler)->)
+
+    #   calculate: ->
+    #     @resetIfError()
+    #     @current_expression.calculate()
+    #     @display()
+
+    #   resetIfError: ->
+    #     @current_expression.isError() && @current_expression.reset()
+
+    #   numberClick: ->
+    #   msg: (part)->
+    #     @resetIfError()
+    #     if part.invoke
+    #       part.invoke(@current_expression)
+    #     else
+    #       @current_expression.msg(part)
+    #     @display()
+
+
+    #   reset: ->
+    #     @current_expression.reset()
+    #     @display()
+
+    #   buttonPressed: (component)->
+    #     component.action(@current_expression)
+    #     @display()
+
+    # class_mixer(LogicController)
 
 
 

          @errorMsg()

      display: ->
        @view.display(@displayValue())

      errorMsg: -> "Error"




ttm.define "calculator",
  ["lib/class_mixer", "lib/math", "widgets/ui_elements", "lib/math/buttons", 'lib/math/expression_to_string'],
  (class_mixer, math, ui_elements, math_buttons,
    expression_to_string)->

    open_widget_dialog = (element)->
      if element.empty()
