[Xerte] Re: What part of the object am I looking at?

Julian Tenney Julian.Tenney at nottingham.ac.uk
Thu Aug 18 10:35:59 BST 2011


ICON.prototype.sendAndLoadVars = function(url, loadVarsObj){
                this.loadVars = new LoadVars();
                this.loadVars.icon = this;
                loadVarsObj.sendAndLoad(url, this.loadVars, "POST");
                this.loadVars.onLoad = function(success){
                                this.icon.broadcast('onSendAndLoadVars')
                }
}


You get someIcon.loadVars, nothing else.

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 18 August 2011 10:24
To: Xerte list
Subject: [Xerte] Re: What part of the object am I looking at?



I'm missing a point I think.


The data returned by someicon.sendAndLoad ends up in someicon.templateData right?
I don't get anything in templateData besides what the server sent back.


The data returned by someicon.sendAndLoadVars ends up in someicon.loadVars?
Along with those other property/value pairs?





________________________________
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
Date: Thu, 18 Aug 2011 09:20:50 +0100
Subject: [Xerte] Re: What part of the object am I looking at?
The engine sets those properties, but it's nothing weird: that's how you should handle the onLoad, i.e. myLV.onLoad =  function{..blah..}

When you inspect it you see the function as a property. Icon is added as a property so that the LV knows which icon to broadcast onLoad from. So I'm not surprised to see them there, but it is confusing how to get at the actual result. I've never used LoadVars myself, but I expect what is happening is that lv is a string object: if you debug(myLV) you get object? Whatabout String(myLV)?

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 17 August 2011 17:29
To: Xerte list
Subject: [Xerte] Re: What part of the object am I looking at?



The thing I'm curious about is the additional properties in the return.


I thought the only thing in the someIcon.loadVars would be what was returned by the call to the server.


e.g.
Value_a TEXT Value_B TEXT Value_c TEXT



where is the rest coming from?
=&onLoad=[type Function]&icon=_level0.engine.IFC.FW_ENT





I really just need to know where I truncate that string so as to just extract the return string.

________________________________
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
Date: Wed, 17 Aug 2011 13:40:35 +0100
Subject: [Xerte] Re: What part of the object am I looking at?
Sorry. Duh, RootIcon == ifc. rootIcon.loadVars is the same thing as rootIcon.loadVars. Must have had too much holiday.

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 17 August 2011 13:38
To: Xerte list
Subject: [Xerte] Re: What part of the object am I looking at?

odd.


debug(rootIcon.ifc.loadVars);
undefined


debug(ifc.loadVars);
Value%5Fa%20TEXT%09Value%5FB%20TEXT%09Value%5Fc%20TEXT%0D%0A=&onLoad=%5Btype%20Function%5D&icon=%5Flevel0%2Eengine%2EIFC%2EFW%5FENT





________________________________
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
Date: Wed, 17 Aug 2011 13:26:03 +0100
Subject: [Xerte] Re: What part of the object am I looking at?
Here's the function in the engine:

ICON.prototype.sendAndLoadVars = function(url, loadVarsObj){
                this.loadVars = new LoadVars();
                this.loadVars.icon = this;
                loadVarsObj.sendAndLoad(url, this.loadVars, "POST");
                this.loadVars.onLoad = function(success){
                                this.icon.broadcast('onSendAndLoadVars')
                }
}

So try decode() on rootIcon.ifc.loadVars?

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 17 August 2011 13:23
To: Xerte list
Subject: [Xerte] Re: What part of the object am I looking at?



debug(ifc.loadVars.decode());


false
Help: "Sets the object iconID.loadVars with the resulting loadVars  properties."

Should the returned data have it own prop?













________________________________
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
Date: Wed, 17 Aug 2011 13:15:19 +0100
Subject: [Xerte] Re: What part of the object am I looking at?
myLV.decode();

??

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 17 August 2011 11:40
To: Xerte list
Subject: [Xerte] What part of the object am I looking at?



vars = new LoadVars ();

vars.CCID = 200;
ifc.sendAndLoadVars('http://www.myserver.com/daveRead.asp', vars);


returns a tab delimited string.


inspect(ifc.loadVars); //returns below


===============
Value_a TEXT Value_B TEXT Value_c TEXT

:
onLoad : [type Function]
icon : _level0.engine.IFC.FW_ENT
===============




debug(ifc.loadVars); //returns below


==================
Value%5Fa%20TEXT%09Value%5FB%20TEXT%09Value%5Fc%20TEXT%0D%0A=&onLoad=%5Btype%20Function%5D&icon=%5Flevel0%2Eengine%2EIFC%2EFW%5FENT
===================




How do I get at just my returned data?
It doesn't seem to have a property.




Dave

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/20110818/320675ec/attachment-0001.html>


More information about the Xerte mailing list