             else
                 button.attr 'disabled', false
             button.text "#{line}"
+
             ### #{usesRemaining}" ###
         @onCommandRemainingValid? valid
         return
 
+    toUsesRemainingText: (usesRemaining,maxUses) ->
+        return 'Already used (delete the code line to re-use this button)' if usesRemaining<=0
+        return 'Can only appear once!' if usesRemaining==1 and maxUses==1
+        return 'Can only appear one more time!' if usesRemaining==1
+        return"Can be used #{usesRemaining} more times"
+        
+        
     moveEditorButtons: =>
         row = @editor.editor.getCursorPosition().row
         maxrows = @editor.editSession.getLength()

            else
                line = @editor.createBlankFunctionHeader(command) + ';'
                funct = codeEditor.insertCommand
            usesRemaining = @commands[command]['usesRemaining']
            button = jQuery '<button>', {
                id: command,
                value: command,
                text: "#{line}",
                title: "#{usesRemaining} remain"
                click: (e) ->
                    (codeEditor.button codeEditor.usesCurrentRow \
                        codeEditor.usesTextDocument funct )

        return

    insertCommand: ({text, line, currentRow}) ->
        @commands[line]['usesRemaining']--
        printLine = (@createBlankFunctionHeader line) + ';'
        @insertLine {text: text, line:printLine, currentRow:currentRow}
