I have indirectly received a test project from you containing the following page:
I then wrote a little script to inspect this page to see whether I could get to the table contents:
project.createWorkingCopy()
.then((workingCopy) => {
const module = workingCopy.model().allModules().filter(m => m.name === "PCP_Statistics")[ 0 ];
const _snippet = module.documents.filter(d => d.name === "CompanyStatistics")[0] as pages.ISnippet;
return loadAsPromise(_snippet).then(snippet => {
dumpTable(0, snippet.widget as pages.Table);
return workingCopy;
});
})
.done(() => {
console.log(`success!`);
}, (error) => {
console.log(`error: ${error}`);
});
function dumpTable(depth: number, table: pages.Table) {
for (let i = 0; i < table.cells.length; i++) {
const widget = table.cells[i].widget;
console.log(depth + " " + " cell " + i + " contains " + widget.typeName);
if (widget instanceof pages.Table) {
dumpTable(depth + 1, widget);
}
}
}
The output of this script is:
0 cell 0 contains Pages$Table
1 cell 0 contains Pages$Table
2 cell 0 contains Pages$ActionButton
2 cell 1 contains Pages$TabContainer
Which is what I would expect. Is this what you were looking for?