 
       displayValue: ->
         if !@current_expression.isError()
-          val = @current_expression.display()
+          val = expression_to_string.toString(@current_expression)
           if val.length == 0
             '0'
           else



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

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

          @errorMsg()

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

      errorMsg: -> "Error"

