Extension sets loaded

This commit is contained in:
Chris Wanstrath
2011-11-11 22:14:20 -08:00
parent 8a363460aa
commit 6ce84e29ea

View File

@@ -1,12 +1,18 @@
# Extension subclasses must call super in all overridden methods.
module.exports =
class Extension
pane: null
loaded: false
constructor: ->
console.log "#{@constructor.name}: Loaded"
storageNamespace: -> @constructor.name
# `startup` should be called by you in Extension subclasses when they need
# to appear on the screen, attach themselves to a Resource, or otherwise become active.
startup: ->
@loaded = true
# `shutdown` shuold be called by you in Extension subclasses when they need
# to be remove from the screen, unattach themselves from a Resource, or otherwise become
# inactive.
shutdown: ->
@loaded = false