prototype
1ère application mobile WebOS avec MOJO (HP+Palm)

Ce week-end, j'ai décidé, avec la sortie de l'HP TouchPad qui approche, de m'amuser avec le WebOS SDK. Je vous livre mes découvertes par le biais d'un rapide tutorial : "comment faire un mini slideware pour WebOS".
J'ai été surpris (très agréablement) par la simplicité de prise en main du SDK, et par la rapidité de l'émulateur.
Vous pouvez me lire directement sur ce blog, ou sinon vous trouverez l'article sur GitHub, ici : https://github.com/k33g/articles/blob/master/2011-05-29-PALM_WEBOS_MOJO.md.
Le code source du tuto se trouve par là : https://github.com/k33g/articles/tree/master/samples/webos
Bonne Lecture et bon Dimanche à tous.
P..... ! Mais c'est bien sûr ! Variables privées et héritage en javascript
Pour une lecture plus confortable : 2011-04-29-PRIVATE_VARS_JS.md sur GitHub
Prototype = evil ? (javascript)
When i want create a "pseudo" class with javascript from scratch (ie without any framework like mootools), i use this :
function animal(){
var name = "?";
this.getName=function(){return name;}
this.setName=function(value){name=value;}
}
var a1 = new animal();
var a2 = new animal();
a1.setName("Aglaë");
a2.setName("Sidonie");
console.log(a1.getName()+' and '+a2.getName());
and the result is :
Aglaë and Sidonie
Ok, fine, it's normal.


Recent comments
1 year 51 weeks ago
1 year 51 weeks ago
1 year 51 weeks ago
1 year 51 weeks ago
1 year 51 weeks ago
1 year 51 weeks ago
1 year 51 weeks ago
1 year 51 weeks ago
1 year 51 weeks ago
1 year 51 weeks ago