>Javascript: modularity is working today but with some grinding, will get module syntax baked in only in ES6...
Modularity, sub-classing and cross-classing has always been possible with JavaScript;
eg: ActiveWidget is a JS library released in 2004;
on the
combobox documentation you'll see:
- 4 parent classes
- 5 mixin classes
- about 50 properties
- about 200 methods
- a number of events
Here is the source code for that control (slightly obfuscated using '...' because of the copyright, while keeping the number of instructions):
AW.UI.Combo = AW.UI.List.subclass();
AW.UI.Combo.create = function(){
AW.UI.ImageText.create.call(this);
AW.UI.Input.create.call(this);
AW.Templates.Combo.create.call(this);
var obj = this.prototype;
obj.setClass("ui", "combo");
obj.setClass("input", "");
obj.defineTemplate("popup", new AW.Templates....);
obj.onCurrentItemChanged = function(i){
...;
...;
...;
};
obj.setController("selection", {
onKeyUp: "...",
onKeyDown: "...",
onItemClicked: "..."
});
};
Thierry Nivelet
FoxinCloud
Give your VFP application a second life, web-based, in YOUR cloud
http://foxincloud.com/Never explain, never complain (Queen Elizabeth II)