RE: [flexcoders] Binding chart to XML

2006-06-22 Thread Daniel Tuppeny





Cheers Ely, that works great!

I had to change it slightly, because the reason my XML was 
in a string, is that it'll be provided externally. I just 
added:

myXml = new XML(sXML);

instead of using the XmlUtil stuff.

Thanks!


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Ely 
GreenfieldSent: 21 June 2006 20:20To: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Binding chart to 
XML



Gotcha. I didn't read your post closely 
enough.

I'm nut sure if you're using Flex 1.5 or 2. In Flex 1.5, 
Charts don't support rendering XML data.


In Flex 2, there are two different types of XML supported 
by the player. 'Classic' XML (flash.xml.XMLNode) and ECMA Standard XML. When I 
say E4X, I mean ECMAScript for XML, which is the set of extensions to the 
language to support XML deeply.

Charts support rendering E4X XML, but not classic XML ( in 
general, unless you have really good reason, don't bother with 'classic' 
XML).

I'd change your code to look something like 
this:

var sXML:XML = 
data item name="Aaa" val="6" 
/ item name="Bbb" val="46" 
/ item name="Ccc" val="16" 
//data;
chart.dataProvider = sXML.children(); // (or = 
sXML..item);



Ely.




From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Daniel 
TuppenySent: Wednesday, June 21, 2006 9:22 AMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Binding chart to 
XML



I wasn't deliberately using E4X (I don't really know what 
it is!!). I thought I was using XML! :-)

I added an @ and get the same issue:

"Property @val not found on flash.xml.XMLNode and there is 
no default value."

Any ideas?


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Ely 
GreenfieldSent: 21 June 2006 16:54To: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Binding chart to 
XML




In E4X parlance, attributes are referred to by prefixing 
their name with @. i.e., to get the val of the first item in your code, 
you would write:

[EMAIL PROTECTED];

So to have a data component (chart, list, etc) pull a value 
from an attribute, you need to do the same:

PieSeries field="@val" /

Ely.



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Daniel 
TuppenySent: Wednesday, June 21, 2006 4:11 AMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] Binding chart to 
XML


I'm trying to bind a chart to an XML document, like this:/* Script 
*/var sXML:String = '\data\item name="Aaa" val="6" 
/\item name="Bbb" val="46" /\item name="Ccc" val="16" 
/\/data\';gXMLDoc = 
mx.utils.XMLUtil.createXMLDocument(sXML);pie.dataProvider = 
gXMLDoc.firstChild.childNodes;/* End of Script */And my 
series looks like this:mx:PieSeries labelPosition="callout" 
field="val"But I keep getting the error: "Property val not found 
onflash.xml.XMLNode and there is no default value".What am I doing 
wrong?ThanksThe 
information contained in this e-mail and/or any attachments is confidential and 
intended only for the individual(s) to which it is addressed. If you are not 
named as an addressee you must not disclose, copy or take any action in reliance 
of this transmission. This e-mail and its attachments have been scanned for 
viruses by MessageLabs 
Ltd.__This 
email has been scanned by the MessageLabs Email Security System.For more 
information please visit http://www.messagelabs.com/email 
__[Inbound Mail Scanned by 
MessageLabs]__This 
email has been scanned by the MessageLabs Email Security System.For more 
information please visit http://www.messagelabs.com/email 
__
 [Inbound Mail Scanned by 
MessageLabs]

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  

[flexcoders] Binding chart to XML

2006-06-21 Thread Daniel Tuppeny
I'm trying to bind a chart to an XML document, like this:


/* Script */

var sXML:String = '\
data\
item name=Aaa val=6 /\
item name=Bbb val=46 /\
item name=Ccc val=16 /\
/data\
';
  
gXMLDoc = mx.utils.XMLUtil.createXMLDocument(sXML);

pie.dataProvider = gXMLDoc.firstChild.childNodes;

/* End of Script */


And my series looks like this:


mx:PieSeries labelPosition=callout field=val


But I keep getting the error: Property val not found on
flash.xml.XMLNode and there is no default value.

What am I doing wrong?

Thanks

The information contained in this e-mail and/or any attachments is confidential 
and intended only for the individual(s) to which it is addressed. If you are 
not named as an addressee you must not disclose, copy or take any action in 
reliance of this transmission. This e-mail and its attachments have been 
scanned for viruses by MessageLabs Ltd.

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


 Yahoo! Groups Sponsor ~-- 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM
~- 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [flexcoders] Binding chart to XML

2006-06-21 Thread Ely Greenfield








In E4X parlance, attributes are referred to by prefixing 
their name with @. i.e., to get the val of the first item in your code, 
you would write:

[EMAIL PROTECTED];

So to have a data component (chart, list, etc) pull a value 
from an attribute, you need to do the same:

PieSeries field="@val" /

Ely.



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Daniel 
TuppenySent: Wednesday, June 21, 2006 4:11 AMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] Binding chart to 
XML


I'm trying to bind a chart to an XML document, like this:/* Script 
*/var sXML:String = '\data\item name="Aaa" val="6" 
/\item name="Bbb" val="46" /\item name="Ccc" val="16" 
/\/data\';gXMLDoc = 
mx.utils.XMLUtil.createXMLDocument(sXML);pie.dataProvider = 
gXMLDoc.firstChild.childNodes;/* End of Script */And my 
series looks like this:mx:PieSeries labelPosition="callout" 
field="val"But I keep getting the error: "Property val not found 
onflash.xml.XMLNode and there is no default value".What am I doing 
wrong?ThanksThe 
information contained in this e-mail and/or any attachments is confidential and 
intended only for the individual(s) to which it is addressed. If you are not 
named as an addressee you must not disclose, copy or take any action in reliance 
of this transmission. This e-mail and its attachments have been scanned for 
viruses by MessageLabs 
Ltd.__This 
email has been scanned by the MessageLabs Email Security System.For more 
information please visit http://www.messagelabs.com/email 
__
__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



RE: [flexcoders] Binding chart to XML

2006-06-21 Thread Daniel Tuppeny





I wasn't deliberately using E4X (I don't really know what 
it is!!). I thought I was using XML! :-)

I added an @ and get the same issue:

"Property @val not found on flash.xml.XMLNode and there is 
no default value."

Any ideas?


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Ely 
GreenfieldSent: 21 June 2006 16:54To: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Binding chart to 
XML




In E4X parlance, attributes are referred to by prefixing 
their name with @. i.e., to get the val of the first item in your code, 
you would write:

[EMAIL PROTECTED];

So to have a data component (chart, list, etc) pull a value 
from an attribute, you need to do the same:

PieSeries field="@val" /

Ely.



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Daniel 
TuppenySent: Wednesday, June 21, 2006 4:11 AMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] Binding chart to 
XML


I'm trying to bind a chart to an XML document, like this:/* Script 
*/var sXML:String = '\data\item name="Aaa" val="6" 
/\item name="Bbb" val="46" /\item name="Ccc" val="16" 
/\/data\';gXMLDoc = 
mx.utils.XMLUtil.createXMLDocument(sXML);pie.dataProvider = 
gXMLDoc.firstChild.childNodes;/* End of Script */And my 
series looks like this:mx:PieSeries labelPosition="callout" 
field="val"But I keep getting the error: "Property val not found 
onflash.xml.XMLNode and there is no default value".What am I doing 
wrong?ThanksThe 
information contained in this e-mail and/or any attachments is confidential and 
intended only for the individual(s) to which it is addressed. If you are not 
named as an addressee you must not disclose, copy or take any action in reliance 
of this transmission. This e-mail and its attachments have been scanned for 
viruses by MessageLabs 
Ltd.__This 
email has been scanned by the MessageLabs Email Security System.For more 
information please visit http://www.messagelabs.com/email 
__ [Inbound Mail Scanned by 
MessageLabs]

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



RE: [flexcoders] Binding chart to XML

2006-06-21 Thread Ely Greenfield







Gotcha. I didn't read your post closely 
enough.

I'm nut sure if you're using Flex 1.5 or 2. In Flex 1.5, 
Charts don't support rendering XML data.


In Flex 2, there are two different types of XML supported 
by the player. 'Classic' XML (flash.xml.XMLNode) and ECMA Standard XML. When I 
say E4X, I mean ECMAScript for XML, which is the set of extensions to the 
language to support XML deeply.

Charts support rendering E4X XML, but not classic XML ( in 
general, unless you have really good reason, don't bother with 'classic' 
XML).

I'd change your code to look something like 
this:

var sXML:XML = 
data item name="Aaa" val="6" 
/ item name="Bbb" val="46" 
/ item name="Ccc" val="16" 
//data;
chart.dataProvider = sXML.children(); // (or = 
sXML..item);



Ely.




From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Daniel 
TuppenySent: Wednesday, June 21, 2006 9:22 AMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Binding chart to 
XML



I wasn't deliberately using E4X (I don't really know what 
it is!!). I thought I was using XML! :-)

I added an @ and get the same issue:

"Property @val not found on flash.xml.XMLNode and there is 
no default value."

Any ideas?


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Ely 
GreenfieldSent: 21 June 2006 16:54To: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Binding chart to 
XML




In E4X parlance, attributes are referred to by prefixing 
their name with @. i.e., to get the val of the first item in your code, 
you would write:

[EMAIL PROTECTED];

So to have a data component (chart, list, etc) pull a value 
from an attribute, you need to do the same:

PieSeries field="@val" /

Ely.



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Daniel 
TuppenySent: Wednesday, June 21, 2006 4:11 AMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] Binding chart to 
XML


I'm trying to bind a chart to an XML document, like this:/* Script 
*/var sXML:String = '\data\item name="Aaa" val="6" 
/\item name="Bbb" val="46" /\item name="Ccc" val="16" 
/\/data\';gXMLDoc = 
mx.utils.XMLUtil.createXMLDocument(sXML);pie.dataProvider = 
gXMLDoc.firstChild.childNodes;/* End of Script */And my 
series looks like this:mx:PieSeries labelPosition="callout" 
field="val"But I keep getting the error: "Property val not found 
onflash.xml.XMLNode and there is no default value".What am I doing 
wrong?ThanksThe 
information contained in this e-mail and/or any attachments is confidential and 
intended only for the individual(s) to which it is addressed. If you are not 
named as an addressee you must not disclose, copy or take any action in reliance 
of this transmission. This e-mail and its attachments have been scanned for 
viruses by MessageLabs 
Ltd.__This 
email has been scanned by the MessageLabs Email Security System.For more 
information please visit http://www.messagelabs.com/email 
__[Inbound Mail Scanned by 
MessageLabs]__This 
email has been scanned by the MessageLabs Email Security System.For more 
information please visit http://www.messagelabs.com/email 
__

__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



RE: [flexcoders] Binding chart to XML

2006-06-21 Thread Tracy Spratt










In Flex 2.0, the XML class is now the new
e4x class. The old XML is still available by using XMLDocument.



That message indicates you still have some
confusion between the two XML classes. There is NO XMLNode in e4x.
Everything is just XML.



But mx.utils.XMLUtil.createXMLDocument(sXML);
I bet is returning that old class, and there is no @ in that class.



Decide which xml you really want to
use. (Use e4x unless you have a really good reason not to). Look at
the docs on e4x, they are very short, then post back.



Tracy











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Tuppeny
Sent: Wednesday, June 21, 2006
12:22 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Binding
chart to XML











I wasn't deliberately using E4X (I don't
really know what it is!!). I thought I was using XML! :-)



I added an @ and get the same issue:



Property @val not found on
flash.xml.XMLNode and there is no default value.



Any ideas?









From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf
Of Ely Greenfield
Sent: 21 June 2006 16:54
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Binding
chart to XML







In E4X parlance, attributes are referred
to by prefixing their name with @. i.e., to get the val of the first item
in your code, you would write:



[EMAIL PROTECTED];



So to have a data component (chart, list,
etc) pull a value from an attribute, you need to do the same:



PieSeries field=@val /



Ely.











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Tuppeny
Sent: Wednesday, June 21, 2006
4:11 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Binding
chart to XML



I'm
trying to bind a chart to an XML document, like this:

/* Script */

var sXML:String = '\
data\
item name=Aaa val=6 /\
item name=Bbb val=46 /\
item name=Ccc val=16 /\
/data\
';

gXMLDoc = mx.utils.XMLUtil.createXMLDocument(sXML);

pie.dataProvider = gXMLDoc.firstChild.childNodes;

/* End of Script */

And my series looks like this:

mx:PieSeries labelPosition=callout
field=val

But I keep getting the error: Property val not found on
flash.xml.XMLNode and there is no default value.

What am I doing wrong?

Thanks

The information contained in this e-mail and/or any attachments is confidential
and intended only for the individual(s) to which it is addressed. If you are
not named as an addressee you must not disclose, copy or take any action in
reliance of this transmission. This e-mail and its attachments have been
scanned for viruses by MessageLabs Ltd.

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email

__




[Inbound Mail Scanned by MessageLabs]

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__






__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___