[Xerte] Re-using an icon to loadVars

Julian Tenney Julian.Tenney at nottingham.ac.uk
Mon Apr 12 15:05:29 BST 2010


I'd try:

If (this.icon.rawData != undefined){
  //we've been here before - do whatever it takes to kill it

}

//then carry on as before

//and check it's changed
debug(this.icon.rawData);


-----Original Message-----
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: Monday, April 12, 2010 2:43 PM
To: Xerte list
Subject: RE: [Xerte] Re-using an icon to loadVars




OK, I'm looking at:

this.icon.rawData = src;

Is that adding the rawData prop to the object?
i.e. is it best to remove the prop and let it be re-added or clear it?
rawData = null;
rawData = '';

??


 



----------------------------------------
> Subject: RE: [Xerte] Re-using an icon to loadVars
> Date: Mon, 12 Apr 2010 13:17:21 +0100
> From: Julian.Tenney at nottingham.ac.uk
> To: xerte at lists.nottingham.ac.uk
>
> you can debug it yourself - in the engine, get in the
> ICON.prototype.loadVars function and try clearing out the data when the
> function is called.
>
> Any good?
>
> -----Original Message-----
> From: xerte-bounces at lists.nottingham.ac.uk
> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
> Sent: Monday, April 12, 2010 1:16 PM
> To: Xerte list
> Subject: RE: [Xerte] Re-using an icon to loadVars
>
>
>
> Did you ever send me that NDA?
>
> ----------------------------------------
>> Subject: RE: [Xerte] Re-using an icon to loadVars
>> Date: Mon, 12 Apr 2010 13:10:35 +0100
>> From: Julian.Tenney at nottingham.ac.uk
>> To: xerte at lists.nottingham.ac.uk
>>
>> Oh you tease. Any chance of sending the file?
>>
>> -----Original Message-----
>> From: xerte-bounces at lists.nottingham.ac.uk
>> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave
> Burnett
>> Sent: Monday, April 12, 2010 1:11 PM
>> To: Xerte list
>> Subject: RE: [Xerte] Re-using an icon to loadVars
>>
>>
>> I just made a new file with 3 buttons:
>>
>> Load gloss text
>> main_page_id.loadVars('http://blah/common/gloss_content.txt');
>>
>> Load help text
>> main_page_id.loadVars('http://blah/common/help_content.txt');
>>
>> Check content
>> debug(main_page_id.rawData);
>>
>> Whatever is loaded first persists.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ----------------------------------------
>>> Subject: RE: [Xerte] Re-using an icon to loadVars
>>> Date: Mon, 12 Apr 2010 12:47:28 +0100
>>> From: Julian.Tenney at nottingham.ac.uk
>>> To: xerte at lists.nottingham.ac.uk
>>>
>>> Dunno. I just exected that if you call the function again, things
>> would
>>> repeat,
>>>
>>> -----Original Message-----
>>> From: xerte-bounces at lists.nottingham.ac.uk
>>> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave
>> Burnett
>>> Sent: Monday, April 12, 2010 12:08 PM
>>> To: Xerte list
>>> Subject: RE: [Xerte] Re-using an icon to loadVars
>>>
>>>
>>>
>>> Tried setting to null, Deleting, Removing.
>>> Couldn't seem to get rid of it.
>>> Bad syntax?
>>>
>>>
>>> ----------------------------------------
>>>> Subject: RE: [Xerte] Re-using an icon to loadVars
>>>> Date: Mon, 12 Apr 2010 12:04:12 +0100
>>>> From: Julian.Tenney at nottingham.ac.uk
>>>> To: xerte at lists.nottingham.ac.uk
>>>>
>>>> rawText? rawData?
>>>>
>>>> What happens if you delete it before making the second call?
>>>>
>>>> -----Original Message-----
>>>> From: xerte-bounces at lists.nottingham.ac.uk
>>>> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave
>>> Burnett
>>>> Sent: Monday, April 12, 2010 12:03 PM
>>>> To: Xerte list
>>>> Subject: RE: [Xerte] Re-using an icon to loadVars
>>>>
>>>>
>>>>
>>>>
>>>> The previous data persists in the rawText property.
>>>> I got around it by using a loadVars call and a readFile call on the
>>> same
>>>> icon, but I found it strange I couldn't just reload the loadVars
>>> object
>>>> with new data.
>>>>
>>>> ----------------------------------------
>>>>> Subject: RE: [Xerte] Re-using an icon to loadVars
>>>>> Date: Mon, 12 Apr 2010 09:53:19 +0100
>>>>> From: Julian.Tenney at nottingham.ac.uk
>>>>> To: xerte at lists.nottingham.ac.uk
>>>>>
>>>>> What happens when you just call myIcon.loadVars(url);
>>>>>
>>>>> ??
>>>>>
>>>>> -----Original Message-----
>>>>> From: xerte-bounces at lists.nottingham.ac.uk
>>>>> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave
>>>> Burnett
>>>>> Sent: Friday, April 02, 2010 5:52 PM
>>>>> To: Xerte list
>>>>> Subject: [Xerte] Re-using an icon to loadVars
>>>>>
>>>>>
>>>>> Any trick to re-using a page for multiple loading of vars?
>>>>> i.e. do I have to kill the rawData object?
>>>>>
>>>>> I have it loading once and I parse out what I need, but I can't
>>> figure
>>>>> out how to use the same object (and event) to have it load a new
>>> file.
>>>>>
>>>>> Have a good weekend all.
>>>>>
>>>>> Dave
>>>>>
>>>>> _________________________________________________________________
>>>>> Hotmail has tools for the New 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_1_____________________________________________
>>>>> __
>>>>> 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 too busy. Combine all your e-mail accounts
>> with
>>> Hotmail.
>>>
>>
> http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PI
>>>
>>
> D28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4___________________________
>>> ____________________
>>> 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
>
> _________________________________________________________________
> 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


More information about the Xerte mailing list