 
   getFromModel: (key) ->
 
+    return null  if @isDisposed
+
     doc = @getRealtimeDoc()
 
     return throw new Error 'Missing arguments'  if not doc or not key



  create: (type, key, initialValue) ->

    doc = @getRealtimeDoc()



    onLoadedCallback = (doc) =>
      doc.addEventListener gapi.drive.realtime.EventType.COLLABORATOR_JOINED, (c) =>
        @emit 'CollaboratorJoined', doc, c  unless @isDisposed

      doc.addEventListener gapi.drive.realtime.EventType.COLLABORATOR_LEFT, (c) =>
        @emit 'CollaboratorLeft', doc, c  unless @isDisposed

      doc.addEventListener gapi.drive.realtime.EventType.DOCUMENT_SAVE_STATE_CHANGED, (c) =>
        @emit 'DocumentSaveStateChanged', doc, c  unless @isDisposed

      @emit 'FileLoaded', doc

