source: Dev/trunk/src/client/dojox/app/module/lifecycle.js @ 501

Last change on this file since 501 was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

  • Property svn:executable set to *
File size: 558 bytes
Line 
1define(["dojo/_base/declare", "dojo/topic"], function(declare, topic){
2        return declare(null, {
3
4                lifecycle: {
5                        UNKNOWN: 0, //unknown
6                        STARTING: 1, //starting
7                        STARTED: 2, //started
8                        STOPPING: 3, //stopping
9                        STOPPED: 4 //stopped
10                },
11
12                _status: 0, //unknown
13
14                getStatus: function(){
15                        return this._status;
16                },
17
18                setStatus: function(newStatus){
19                        this._status = newStatus;
20
21                        // publish /app/status event.
22                        // application can subscribe this event to do some status change operation.
23                        topic.publish("/app/status", newStatus);
24                }
25        });
26});
Note: See TracBrowser for help on using the repository browser.