Windows-from-json.js

Create one or more windows from JSON data.  You can define all the same properties as you can for new MochaUI.Window().  Undefined properties are set to their defaults.

Copyright

Copyright © 2007-2008 Greg Houston, http://greghoustondesign.com/.

License

MIT-style license.

Syntax

MochaUI.newWindowsFromJSON(properties);

Example

MochaUI.jsonWindows = function(){
    var url = 'data/json-windows-data.js';
    var request = new Request.JSON({
        url: url,
        method: 'get',
        onComplete: function(properties) {
            MochaUI.newWindowsFromJSON(properties.windows);
        }
    }).send();
}

Note

Windows created from JSON are not compatible with the current cookie based version of Save and Load Workspace.

See Also

Window

Creates a single MochaUI window.
Close