[Xerte] Re: viewing data in array question

Julian Tenney Julian.Tenney at nottingham.ac.uk
Wed Sep 14 10:11:27 BST 2011


inspect(rootIcon.trackingData, true);

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of KnowledgeWare
Sent: 14 September 2011 04:16
To: Xerte discussion list
Subject: [Xerte] viewing data in array question

I'd like to be able to view all the data inside the rootIcon.trackingData array - but when I run it in 'debug' it just lists (object Object) six times. I was expecting to see a list of all the objects and properties...I'd just like a visual way to confirm all the data in the array during development. Anyone know how I can do that?

rootIcon.trackingData = new Array();

for (i=0;i<numpages;i++){
rootIcon.trackingData[i] = new Object();
}

rootIcon.trackingData[1].score = 88;
rootIcon.trackingData[1].passmark = 100;
rootIcon.trackingData[1].name = 'Mickey Mouse';
rootIcon.trackingData[2].score = 22222;
rootIcon.trackingData[3].score = 3333333;
debug( rootIcon.trackingData );        //all I see here is (object Object) six times - was expecting to see score, passmark, name properties, etc.

TIA
RonM2


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20110914/33fc5601/attachment-0001.html>


More information about the Xerte mailing list