[Xerte] check then disable checkbox

Julian Tenney Julian.Tenney at nottingham.ac.uk
Thu Sep 30 10:03:34 BST 2010


If the checkbox hasn't been created yet, yes, unless you have cboxArray left over from a previous page?

SCR //make your checkboxes
INT
  PROTITEMS MADE HERE //set perpetual 1
SCR //check the checkboxes here?

I do it this way: you know where you are then. The only problem is when you need the interaction to not be perpetual.

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 29 September 2010 22:43
To: Xerte list
Subject: RE: [Xerte] check then disable checkbox


Shouldn't this fail then:

engine[cboxArray[0]].setEnabled(false);

I'm addressing the rs, not the XML right?




________________________________
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
Date: Wed, 29 Sep 2010 22:35:17 +0100
Subject: RE: [Xerte] check then disable checkbox
Beforehand, when you duplicate(), you have only .xml.

Afterwards come the MovieClips.

________________________________
From: xerte-bounces at lists.nottingham.ac.uk [xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett [d_b_burnett at hotmail.com]
Sent: 29 September 2010 22:34
To: Xerte list
Subject: RE: [Xerte] check then disable checkbox

That's exactly what works of course.

I just got stubborn and wanted to try to do it all in the creation SCR.
Came close. They can be set disabled, but the checked thing must require a longer delay.
I just didn't understand why I could dupe then set labels no problem. That's the way someone set it up ;-)
And then disabling seemed to work.
But it fell over on the checkmarks.

________________________________
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
Date: Wed, 29 Sep 2010 22:03:43 +0100
Subject: RE: [Xerte] check then disable checkbox
Does this work

SCR //make yor checkboxes
INT
  PROTITEMS MADE HERE //set perpetual 1
SCR //check the checkboxes here?

?

________________________________
From: xerte-bounces at lists.nottingham.ac.uk [xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney [Julian.Tenney at nottingham.ac.uk]
Sent: 29 September 2010 21:38
To: Xerte discussion list
Subject: RE: [Xerte] check then disable checkbox
Yeah, that's a real pain. I've hit a few of those. You've proved it is timing?

Can't we do it as they instantiate? You want to select the checkboxes right off the bat?

________________________________
From: xerte-bounces at lists.nottingham.ac.uk [xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett [d_b_burnett at hotmail.com]
Sent: 29 September 2010 21:14
To: Xerte list
Subject: RE: [Xerte] check then disable checkbox
>Might be a timing issue

Think you sussed it.

All that time wasted, duh.
Well at least I found the setCheckState(true) nugget.

________________________________
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
Date: Wed, 29 Sep 2010 20:50:14 +0100
Subject: RE: [Xerte] check then disable checkbox
are you debugging out the various bits and seeing what you expect?

inspect() reveal anything?

Might be a timing issue - can you manually do that later, just to see?

________________________________
From: xerte-bounces at lists.nottingham.ac.uk [xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett [d_b_burnett at hotmail.com]
Sent: 29 September 2010 20:20
To: Xerte list
Subject: RE: [Xerte] check then disable checkbox

I bumbled across this which appears to work:

tempNode.attributes.rs = 'cbox' + icon.parentNode.index() + i;
cboxArray.push(tempNode.attributes.rs);
engine[cboxArray[0]].setCheckState(true);
engine[cboxArray[0]].setEnabled(false);


Now of course I can't finds the syntax or casting that will take a dynamic index in the cboxArray

e.g.
engine[cboxArray[0]].setCheckState(true); //works
engine[cboxArray[cboxArray.length-1]].setCheckState(true); //doesn't


I hate AS.

________________________________
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
Date: Wed, 29 Sep 2010 20:13:10 +0100
Subject: RE: [Xerte] check then disable checkbox
only buttons do setChecked. The checkbox is a checkbox, not a button, i.e. it's not based on the buttontemplate.fla

________________________________
From: xerte-bounces at lists.nottingham.ac.uk [xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett [d_b_burnett at hotmail.com]
Sent: 29 September 2010 17:25
To: Xerte list
Subject: RE: [Xerte] check then disable checkbox
>Then after the icons have been parsed you know how to get at them. I think you know / do that already?

Yes, doing that.

But it bugs me why this is taking place:

icon.nextSibling.firstChild.duplicate(x);
tempNode.attributes.label = data.question[blah[i]];
//set a dynamic rs
tempNode.attributes.rs = 'cbox' + icon.parentNode.index() + i;

//push that rs into an array
cboxArray.push(tempNode.attributes.rs);

//address the rs via engine

engine[cboxArray[0]].setChecked(true,false); // does not work.

engine[cboxArray[0]].setEnabled(false); //works, sets checkbox disabled

I would have expected failures of both or neither

:-?



________________________________






From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 29 September 2010 16:40
To: Xerte list
Subject: RE: [Xerte] check then disable checkbox

Thanks Julian. I may be going at this all backwards though.

Proto checkbox gets duped x times

icon.nextSibling.firstChild.duplicate(x);

Then next line of code sets checkbox labels
tempNode.attributes.label = data.question[blah[i]];

At this same stage should I also be able to set rs, then checked/enabled using the rs value?




________________________________
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
Date: Wed, 29 Sep 2010 15:11:50 +0100
Subject: RE: [Xerte] check then disable checkbox
Go get the latest build from http://www.nottingham.ac.uk/xerte/downloads/setup.exe and you'll find what you're looking for.

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 29 September 2010 14:33
To: Xerte list
Subject: [Xerte] check then disable checkbox

Probably missing something obvious as I'm re-wrapping my head after holidays.

Button off interaction has visible/enabled property.
Not available for checkboxes, or is it inherited from superclass or something?

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.

_______________________________________________ Xerte mailing list Xerte at lists.nottingham.ac.uk http://lists.nottingham.ac.uk/mailman/listinfo/xerte 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.

_______________________________________________ Xerte mailing list Xerte at lists.nottingham.ac.uk http://lists.nottingham.ac.uk/mailman/listinfo/xerte 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.

_______________________________________________ Xerte mailing list Xerte at lists.nottingham.ac.uk http://lists.nottingham.ac.uk/mailman/listinfo/xerte 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.

_______________________________________________ Xerte mailing list Xerte at lists.nottingham.ac.uk http://lists.nottingham.ac.uk/mailman/listinfo/xerte 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.

_______________________________________________ Xerte mailing list Xerte at lists.nottingham.ac.uk http://lists.nottingham.ac.uk/mailman/listinfo/xerte 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.

_______________________________________________ Xerte mailing list Xerte at lists.nottingham.ac.uk http://lists.nottingham.ac.uk/mailman/listinfo/xerte 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/attachments/20100930/f2def20e/attachment.html


More information about the Xerte mailing list