example of array problem

This commit is contained in:
Sam Rang
2016-04-13 13:28:56 -05:00
parent 243b8ed24c
commit 6f0dc6d70f
4 changed files with 44 additions and 10 deletions

View File

@@ -15,9 +15,13 @@ class Module extends Serializable<Module> {
keyActions: Serializable<KeyActions>;
_fromJsObject(jsObject: any): Module {
this.moduleId = jsObject.id;
this.moduleId = jsObject.moduleId;
this.role = PointerRole[<string> jsObject.pointerRole];
this.keyActions = new KeyActions().fromJsObject(jsObject.keyActions);
/*
console.log("ModuleId: "+this.moduleId);
console.log("PointerRole:"+PointerRole[this.role]);
*/
return this;
}
@@ -30,7 +34,7 @@ class Module extends Serializable<Module> {
_toJsObject(): any {
return {
id: this.moduleId,
moduleId: this.moduleId,
pointerRole: PointerRole[this.role],
keyActions: this.keyActions.toJsObject()
}
@@ -43,7 +47,7 @@ class Module extends Serializable<Module> {
}
toString(): string {
return `<Module id="${this.moduleId}">`;
return `<Module moduleId="${this.moduleId}" role="${this.role}">`;
}
}