[Xerte] variables in dot syntax

Dave Burnett d_b_burnett at hotmail.com
Mon Jul 26 12:00:55 BST 2010


It does.
After 33 permutations I guess I was dulling out.
You're the beast!
Another few pints on the ledger.


----------------------------------------
> Subject: RE: [Xerte] variables in dot syntax
> Date: Mon, 26 Jul 2010 11:45:41 +0100
> From: Julian.Tenney at nottingham.ac.uk
> To: xerte at lists.nottingham.ac.uk
>
> _level0.engine['dave_0'] doesn't work?
>
> -----Original Message-----
> From: xerte-bounces at lists.nottingham.ac.uk
> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
> Sent: 26 July 2010 11:43
> To: Xerte list
> Subject: RE: [Xerte] variables in dot syntax
>
>
>
>
> Works as expected if I use a case statement:
>
> switch (icon.parentNode.parentNode.parentNode.index()) {
> case 0:
> dave_0.swfFile.lab_text.text = 'dave_0';
> dave_0.swfFile._y = 0;
> break ;
> case 0:
>
> dave_1.swfFile.lab_text.text = 'dave_1';
>
> dave_1.swfFile._y = 100;
>
> break ;
> etc
>
> I'm baffled as to why the dave_x won't take an array index or
> concatenated or eval'ed value.
>
> I'll just have to put enough case statements in to cover the max
> foreseen button instances.
> Ugly as me.
> :-)
>
>
>
> ----------------------------------------
>> Subject: RE: [Xerte] variables in dot syntax
>> Date: Mon, 26 Jul 2010 11:07:47 +0100
>> From: Julian.Tenney at nottingham.ac.uk
>> To: xerte at lists.nottingham.ac.uk
>>
>> I would. You can set a custom attribute on the XML 'buttonLabel' or
>> something like that, and then access it from within the button
>> parent.XMLElement.customButton or some such.
>>
>> -----Original Message-----
>> From: xerte-bounces at lists.nottingham.ac.uk
>> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave
> Burnett
>> Sent: 26 July 2010 11:05
>> To: Xerte list
>> Subject: RE: [Xerte] variables in dot syntax
>>
>>
>>
>> Ditch the load event?
>>
>>
>> ----------------------------------------
>>> Subject: RE: [Xerte] variables in dot syntax
>>> Date: Mon, 26 Jul 2010 11:03:28 +0100
>>> From: Julian.Tenney at nottingham.ac.uk
>>> To: xerte at lists.nottingham.ac.uk
>>>
>>> I'd make a custom button that reaches up to the XMLNode for a custom
>>> parameter and sets its text from that, rather than trying to reach
>> into
>>> the button once it's loaded.
>>>
>>> -----Original Message-----
>>> From: xerte-bounces at lists.nottingham.ac.uk
>>> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave
>> Burnett
>>> Sent: 26 July 2010 10:59
>>> To: Xerte list
>>> Subject: RE: [Xerte] variables in dot syntax
>>>
>>>
>>>
>>> In the proto interaction, I found the button swf can not be addressed
>>> until loaded.
>>> So I added a load event below the button.
>>> As each swf loads, I want to set some parameters.
>>>
>>> So in the proto, a line queries the icon above for it's rs, then
> needs
>>> to use that to set the params on the correct button.
>>>
>>> While:
>>>
>>> myVar = 'swfFile';
>>> debug(dave_4.[myVar]button._totalFrames);//dave_4 is unique rs of
>> button
>>> above
>>>
>>> reports correctly
>>>
>>> I can't find any syntax that will allow a var for the "dave_4" part,
>> so
>>> I can make it dynamic in the proto.
>>>
>>>
>>> Same here:
>>>
>>
> debug(_level0.engine.IFC.PG_MC22.DEC_MC1.PG_MC4.Int_MC1.but1.swfFile.but
>>> ton._totalFrames);
>>>
>>> Works hardcoded; can't find any syntax to vary the "PG_MC4" part
>>>
>>>
>>>
>>>
>>> ----------------------------------------
>>>> Subject: RE: [Xerte] variables in dot syntax
>>>> Date: Mon, 26 Jul 2010 10:45:34 +0100
>>>> From: Julian.Tenney at nottingham.ac.uk
>>>> To: xerte at lists.nottingham.ac.uk
>>>>
>>>> No, sometimes it's helpful to dynamically create a load of things,
>>> like
>>>> the buttons, then afterwards, make an array to hold references to
>>> them.
>>>>
>>>> I'm still a bit lost as to why you're stuck?
>>>>
>>>> -----Original Message-----
>>>> From: xerte-bounces at lists.nottingham.ac.uk
>>>> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave
>>> Burnett
>>>> Sent: 26 July 2010 10:43
>>>> To: Xerte list
>>>> Subject: RE: [Xerte] variables in dot syntax
>>>>
>>>>
>>>>
>>>> Or do you mean I push the whole thing into an array:
>>>>
>>>> Array[0] = dave_4.swfFile.button.text;
>>>>
>>>>
>>>>
>>>> ----------------------------------------
>>>>> Subject: RE: [Xerte] variables in dot syntax
>>>>> Date: Mon, 26 Jul 2010 10:34:50 +0100
>>>>> From: Julian.Tenney at nottingham.ac.uk
>>>>> To: xerte at lists.nottingham.ac.uk
>>>>>
>>>>> SCR
>>>>> INT
>>>>> BUTTON
>>>>>
>>>>> In the script:
>>>>> icon.nextSibling.firstChild.duplicate(someNumber - 1);
>>>>>
>>>>> for (I = 0; I < someNumber; i++){
>>>>> icon.nextSibling.childNOdes[i].attributes.rs = 'dave_' + i
>>>>> }
>>>>>
>>>>> Gives you unique IDs?
>>>>>
>>>>> Afterwards you can push them all into an array, and then loop over
>>> the
>>>>> array?
>>>>>
>>>>> Is this the tree thing? Did you get my example (isent it, you
> didn't
>>>>> respond, so I thought maybe your hotmail barfed on it). Attached
>>>> again,
>>>>>
>>>>> J
>>>>>
>>>>> -----Original Message-----
>>>>> From: xerte-bounces at lists.nottingham.ac.uk
>>>>> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave
>>>> Burnett
>>>>> Sent: 26 July 2010 10:31
>>>>> To: Xerte list
>>>>> Subject: RE: [Xerte] variables in dot syntax
>>>>>
>>>>>
>>>>>
>>>>> If the text on each button is being set to something different,
>> don't
>>>> I
>>>>> need a unique rs?
>>>>>
>>>>> ----------------------------------------
>>>>>> Subject: RE: [Xerte] variables in dot syntax
>>>>>> Date: Mon, 26 Jul 2010 10:29:12 +0100
>>>>>> From: Julian.Tenney at nottingham.ac.uk
>>>>>> To: xerte at lists.nottingham.ac.uk
>>>>>>
>>>>>> Yes, but you don't need to change it?
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: xerte-bounces at lists.nottingham.ac.uk
>>>>>> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave
>>>>> Burnett
>>>>>> Sent: 26 July 2010 10:29
>>>>>> To: Xerte list
>>>>>> Subject: RE: [Xerte] variables in dot syntax
>>>>>>
>>>>>>
>>>>>>
>>>>>> If I have a series of swf button responses and I want to change
> the
>>>>> text
>>>>>> in each, don't I have to use the rs value?
>>>>>>
>>>>>>
>>>>>> ----------------------------------------
>>>>>>> Subject: RE: [Xerte] variables in dot syntax
>>>>>>> Date: Mon, 26 Jul 2010 09:38:27 +0100
>>>>>>> From: Julian.Tenney at nottingham.ac.uk
>>>>>>> To: xerte at lists.nottingham.ac.uk
>>>>>>>
>>>>>>> Why do you need to? I have never needed to do that...
>>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: xerte-bounces at lists.nottingham.ac.uk
>>>>>>> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave
>>>>>> Burnett
>>>>>>> Sent: 25 July 2010 22:22
>>>>>>> To: Xerte list
>>>>>>> Subject: [Xerte] variables in dot syntax
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> No hair left.
>>>>>>>
>>>>>>> I am addressing a swf loaded as a button interaction response.
>>>>>>> I am assigning rs values dynamically e.g. dave_4
>>>>>>>
>>>>>>> The line below gives me the correct frame count of the button
>>>> states.
>>>>>>> dave_4.swfFile.button._totalFrames
>>>>>>>
>>>>>>>
>>>>>>> But how do I dynamically vary that rs value?
>>>>>>>
>>>>>>> I can't seem to find a syntax that it likes
>>>>>>>
>>>>>>> Dave
>>>>>>>
>>>>>>> _________________________________________________________________
>>>>>>> The New Busy is not the old busy. Search, chat and e-mail from
>> your
>>>>>>> inbox.
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
> ON:WL:en-US:WM_HMP:042010_3_____________________________________________
>>>>>>> __
>>>>>>> Xerte mailing list
>>>>>>> Xerte at lists.nottingham.ac.uk
>>>>>>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>>>>>>> _______________________________________________
>>>>>>> Xerte mailing list
>>>>>>> Xerte at lists.nottingham.ac.uk
>>>>>>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>>>>>>
>>>>>> _________________________________________________________________
>>>>>> The New Busy think 9 to 5 is a cute idea. Combine multiple
>> calendars
>>>>>> with Hotmail.
>>>>>>
>>>>>
>>>>
>>>
>>
> http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=P
>>>>>>
>>>>>
>>>>
>>>
>>
> ID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5__________________________
>>>>>> _____________________
>>>>>> Xerte mailing list
>>>>>> Xerte at lists.nottingham.ac.uk
>>>>>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>>>>>> _______________________________________________
>>>>>> Xerte mailing list
>>>>>> Xerte at lists.nottingham.ac.uk
>>>>>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>>>>>
>>>>> _________________________________________________________________
>>>>> The New Busy is not the old busy. Search, chat and e-mail from your
>>>>> inbox.
>>>>>
>>>>
>>>
>>
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:
>>>>>
>>>>
>>>
>>
> ON:WL:en-US:WM_HMP:042010_3_____________________________________________
>>>>> __
>>>>> Xerte mailing list
>>>>> Xerte at lists.nottingham.ac.uk
>>>>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>>>>
>>>> _________________________________________________________________
>>>> Hotmail is redefining busy with tools for the New Busy. Get more
> from
>>>> your inbox.
>>>>
>>>
>>
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:
>>>>
>>>
>>
> ON:WL:en-US:WM_HMP:042010_2_____________________________________________
>>>> __
>>>> Xerte mailing list
>>>> Xerte at lists.nottingham.ac.uk
>>>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>>>> _______________________________________________
>>>> Xerte mailing list
>>>> Xerte at lists.nottingham.ac.uk
>>>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>>>
>>> _________________________________________________________________
>>> Hotmail is redefining busy with tools for the New Busy. Get more from
>>> your inbox.
>>>
>>
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:
>>>
>>
> ON:WL:en-US:WM_HMP:042010_2_____________________________________________
>>> __
>>> Xerte mailing list
>>> Xerte at lists.nottingham.ac.uk
>>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>>> _______________________________________________
>>> Xerte mailing list
>>> Xerte at lists.nottingham.ac.uk
>>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>>
>> _________________________________________________________________
>> Hotmail is redefining busy with tools for the New Busy. Get more from
>> your inbox.
>>
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:
>>
> ON:WL:en-US:WM_HMP:042010_2_____________________________________________
>> __
>> Xerte mailing list
>> Xerte at lists.nottingham.ac.uk
>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>> _______________________________________________
>> Xerte mailing list
>> Xerte at lists.nottingham.ac.uk
>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
> _________________________________________________________________
> The New Busy is not the old busy. Search, chat and e-mail from your
> inbox.
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:
> ON:WL:en-US:WM_HMP:042010_3_____________________________________________
> __
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
 		 	   		  
_________________________________________________________________
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. 
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5


More information about the Xerte mailing list