[Xerte-dev] Re: dumb question about variables and xerte content page type....

Ron Mitchell ronm at mitchellmedia.co.uk
Tue Feb 28 12:26:49 GMT 2012


Ok cheers

I had actually tried something similar but trying again has highlighted the
real problem...

I was setting the value in a script icon attached to the text entry and
although that was debugging ok setting it in a later script icon seems to
have fixed the problem. But will do as suggested anyway and create and use
an object.

Cheers

Ron

 

From: xerte-dev-bounces at lists.nottingham.ac.uk
[mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 28 February 2012 11:43
To: For Xerte technical developers
Subject: [Xerte-dev] Re: dumb question about variables and xerte content
page type....

 

Maybe it's just me but I wouldn't use those areas to store the data, not
sure there is any reason not to, but it doesn't feel quite right.

 

I'd create a property on rootIcon, probably an object, and store data in
that:

 

If (rootIcon.dataStore == undefined){ //we haven't already got one

  rootIcon.dataStore = new Object();

}

 

then later

 

rootIcon.dataStore.yourDataName = "some value";

 

It would be easy to add this to the engine and make it part of the
framework, then you could have convenient methods for getting / setting the
values. But it ought to work through your own script anyway.

 

From: xerte-dev-bounces at lists.nottingham.ac.uk
[mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Ron Mitchell
Sent: 28 February 2012 11:39
To: 'For Xerte technical developers'
Subject: [Xerte-dev] dumb question about variables and xerte content page
type....

 

Hi

this is probably a dumb question that I should know the answer to and I'm
sure I'm doing or missing something stupid - my only excuse - been a bit
under the weather :-(

 

I'm testing adding a couple of model files via xerte content to an XOT
project. In the first model I want to capture text entries and store in a
variable(s) and then access what was entered in the other model imported to
a separate and later page. But I'm struggling to pick up those variables in
the second model/page. 

 

I've tried _root.myvariablename=myrs.text; _level0.myvariablename=myrs.text;
_global.myvariablename=myrs.text;

 

What am I missing? Is it something to do with the way xerte content pages
are loaded?

 

Cheers

Ron

 

This message and any attachment are intended solely for the addressee and
may contain confidential information. If you have received this message in
error, please send it back to me, and immediately delete it. Please do not
use, copy or disclose the information contained in this message or in any
attachment. Any views or opinions expressed by the author of this email do
not necessarily reflect the views of the University of Nottingham. 

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20120228/9be7522c/attachment.html>


More information about the Xerte-dev mailing list