 class CollaborativeWorkspace extends Workspace
 
   init: ->
+    @nickname    = KD.nick()
     @sessionData = []
     @users       = {}
     @createRemoteInstance()


    @on "KDObjectWillBeDestroyed", =>
      @forceDisconnect()
      @workspaceRef.off eventName for eventName in ["value", "child_added", "child_removed", "child_changed"]

  fetchUsers: ->
    @workspaceRef.once "value", (snapshot) =>

    @emit "PanelCreated", newPanel

  createSessionKey: ->
    u = KD.utils
    return "#{@nickname}_#{u.generatePassword(4)}_#{u.getRandomNumber(100)}"

  getHost: ->
    return @sessionKey.split("_").first

  amIHost: ->
    [sessionOwner] = @sessionKey.split "_"
    return sessionOwner is @nickname

  showNotActiveView: ->
    notValid = new KDView
