Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
.Net Ecosystem Shrinking?
Message
De
20/06/2015 06:38:39
 
 
À
19/06/2015 14:21:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01621184
Message ID:
01621315
Vues:
66
>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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform