Code : Tout sélectionner
function setTab()
{
this.inNbLig=0;
this.inNbCol=0;
this.addCel=addCellule;
}
function addCellule(inLig, inCol, szAff, inStatut)
{
var tbCel = new Object;
tbCel.szAff=szAff;
tbCel.inStatut=inStatut;
this[this.inLig][this.inCol]=tbCel;
}
var planning = new setTab ();
nombre de lignes, nombre de colonnes...
et un tableau à 2 dimensions pour stocker des infos sur chaques cellules.
Je pensais accéder à ces informations avec :
Code : Tout sélectionner
nombre = planning.inNbLig;
Code : Tout sélectionner
tache = planning[3][7].szAff;
Lorsque j'essaye de charger ma structure avec :
Code : Tout sélectionner
planning.addCel(0, 0, "A5732", 100);
Une piste ?
Amicalement
Stéphane