Declares all variables and functions on NEST
Members :
- env
The items listed below are variable runtime environment information.
- ComponentType
Each component posses one enumeration listed below in order to compare between components.
- define(namespace, clazz)
Methods used when declaring components must use both parameters below.
Parameters:
Example:
NEST.define("com.nxstinc.nest.component", {
Button : function() {
var clazz = function(id) {
this.id = id;
this.text = undefined;
};
clazz.prototype = NEST.inherits("com.nxstinc.nest.component.VisualComponent");
clazz.prototype.paint = function(context) {
...
};
clazz.prototype.hide = function() {
};
clazz.prototype.show = function() {
};
// #ifdef designing
clazz.prototype.editor = function() {
var d = {
palette : {
category : "Basic",
priority : -1,
description : "Image",
},
property : {
text : {
type : "string",
category : "Setup",
priority : 1,
},
},
method : {
show : {
priority : 1,
},
hide : {
priority : 2,
},
},
event : {
onTap : {
priority : 1,
},
},
};
return d;
};
// #endif designing
return clazz;
}
});
- inherits(_super)
Methods used when declaring components must use the parameter below.
Parameters:
Example:
NEST.define("com.nxstinc.nest.component", {
Button : function() {
var clazz = function(id) {
this.id = id;
this.text = undefined;
};
clazz.prototype = NEST.inherits("com.nxstinc.nest.component.VisualComponent");
- loadJs(scriptId, src, onLoad)
Used when referring and loading dynamic Javascript Files
Parameters:
Example:
var gUrl = "https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&libraries=places";
NEST.loadJs("maps", gUrl, function() {
if (google.maps && google.maps.places) {
me.gCallback();
}
});
- loadStylesheet(styleId, src, onLoad)
Used when referring and loading dynamic CSS Files
Parameters:
Example:
NEST.loadStylesheet("selectbar.css",
"assets/selectbar/selectbar.css",
function() {
}
);
- loadStylesheetInline(styleId, cssString, onLoad)
Used when referring and loading dynamic Inline CSS
Parameters:
Example:
NEST.loadStylesheet("selectbar.css",
".myclass {background-color: #ddd}",
function() {
}
);
- removeJs(scriptId)
Used to delete the loaded script
Parameters:
Example:
NEST.removeJs("selectbar.js");
- removeStylesheet(styleId))
Used to delete the loaded script
Parameters:
Example:
NEST.removeStylesheet("selectbar.css");