 
 
   initialize: (wizardView) ->
+    @checkNameEditorView @editor
+    @warnPackageText.hide()
+
     @editor.getEditor().onDidChange =>
       unless @editor.getText() is ""
         wizardView.enableNext()

{View, EditorView} = require 'atom'

module.exports =
class ProjectInfoView extends View


  onNext: (wizard) ->
    wizard.mergeOptions {
      name: @editor.originalText
      bootstrap: @find('#withBootstrap').is(":checked")
      ratchet: @find('#withRatchet').is(":checked")
    }
    wizard.nextStep()

  checkNameEditorView: (editorView)->
    editorView.originalText = ''
    editorView.hiddenInput.on 'focusout', (e) =>
      @checkName editorView

  checkName: (editorView)->
    str = editorView.getText()
    strcheck = checkProjectName str
    editorView.originalText = strcheck
    @warnPackageTextLabel.html("Will be created as #{strcheck}")

    if strcheck is str
      @warnPackageText.hide()
    else
      @warnPackageText.show()
