RE: [Flashcoders] E4X, it's just not my day.
>> that can cause problems too if the .aso files. What I meant to type was , "that can cause problems too if the .aso files have a timestamp inconsistency with the .as files." Jason Merrill Bank of America Global Learning Learning & Performance Soluions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill, Jason Sent: Saturday, February 06, 2010 6:35 AM To: Flash Coders List Subject: RE: [Flashcoders] E4X, it's just not my day. Not sure if this is the problem but it never hurts to also try deleting your .aso files as well, to be sure flash isn't trying to compile an old file. If it still seems to be doing this - check the timestamps on the .as files - that can cause problems too if the .aso files. Also, if you have another .swf used in your project that uses the same class, that can mean your project will use the other .swf's older version instead of your new one. If all else fails, see this: http://stackoverflow.com/questions/2193953/flash-cs4-refuse-to-let-go - pretty humorous read. Jason Merrill Bank of America Global Learning Learning & Performance Soluions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mendelsohn, Michael Sent: Friday, February 05, 2010 3:29 PM To: Flash Coders List Subject: RE: [Flashcoders] E4X, it's just not my day. Thanks Jason. I am suspecting there's something weird about my Flash file, and I can't pinpoint exactly what it is. These are simple E4X statements. Thanks everyone for replying. I appreciate it. - MM ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] E4X, it's just not my day.
Not sure if this is the problem but it never hurts to also try deleting your .aso files as well, to be sure flash isn't trying to compile an old file. If it still seems to be doing this - check the timestamps on the .as files - that can cause problems too if the .aso files. Also, if you have another .swf used in your project that uses the same class, that can mean your project will use the other .swf's older version instead of your new one. If all else fails, see this: http://stackoverflow.com/questions/2193953/flash-cs4-refuse-to-let-go - pretty humorous read. Jason Merrill Bank of America Global Learning Learning & Performance Soluions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mendelsohn, Michael Sent: Friday, February 05, 2010 3:29 PM To: Flash Coders List Subject: RE: [Flashcoders] E4X, it's just not my day. Thanks Jason. I am suspecting there's something weird about my Flash file, and I can't pinpoint exactly what it is. These are simple E4X statements. Thanks everyone for replying. I appreciate it. - MM ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] E4X, it's just not my day.
Thanks Jason. I am suspecting there's something weird about my Flash file, and I can't pinpoint exactly what it is. These are simple E4X statements. Thanks everyone for replying. I appreciate it. - MM ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] E4X, it's just not my day.
Yes, definitely something weird on your end - something isn't the same as what you're posting, because if I make sure your XML is well-formed, the following works perfectly for me and both traces show the same intended result. Try this in a fresh flash file: var artData:XML = new XML( An artist He sucks She rocks ); var lastName="Agrafiotis"; var a:XMLList = artData.bios.artistBio.(@s==lastName); trace("First method: "+a); // correctly finds all s=="Agrafiotis" nodes var b:XMLList = artData.bios.*.(@s==lastName); trace("Second method: "+b); // correctly finds all s=="Agrafiotis" nodes I know you're probably testing this with some other Xml which may look different - so make sure the structure is truly the same as your example. Hope that helps, Jason Merrill Bank of America Global Learning Learning & Performance Soluions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mendelsohn, Michael Sent: Friday, February 05, 2010 1:07 PM To: Flash Coders List Subject: RE: [Flashcoders] E4X, it's just not my day. Sorry folks, that was a typo in the post. In my Flash file, it is indeed correctly formed XML. var e = artData.bios.artistBio.(@s==lastName); var d = artData.bios.*.(@s==lastName); There is something definitely weird going on in my code, because this is a simple E4X statement. Seriously, shouldn't e and d both return the one node that fits that criteria? In my class, e returns undefined, and d correctly returns it. - MM -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Jer Brand Sent: Friday, February 05, 2010 12:16 PM To: Flash Coders List Subject: Re: [Flashcoders] E4X, it's just not my day. Fixing that, your code works (I just added explicit var types). var artData:XML = new XML( an artist He sucks She rocks ); var lastName:String="Agrafiotis"; var a:XMLList = artData.bios.artistBio.(@s==lastName); trace(a.toXMLString()) var b:XMLList = artData.bios.*.(@s==lastName); trace(b.toXMLString()) ; OUTPUTS: an artist She rocks an artist She rocks Jer ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X, it's just not my day.
var artData:XML = new XML( an artist He sucks She rocks ); var lastName="Agrafiotis"; // undefined var a = artData.bios.artistBio.(@s==lastName); // correctly finds the Peter Agrafiotis node var b = artData.bios.*.(@s==lastName); trace(a); trace(b); this works for me. On Fri, Feb 5, 2010 at 10:06 AM, Mendelsohn, Michael < michael.mendels...@fmglobal.com> wrote: > Sorry folks, that was a typo in the post. In my Flash file, it is indeed > correctly formed XML. > > var e = artData.bios.artistBio.(@s==lastName); > > var d = artData.bios.*.(@s==lastName); > > There is something definitely weird going on in my code, because this is a > simple E4X statement. Seriously, shouldn't e and d both return the one node > that fits that criteria? In my class, e returns undefined, and d correctly > returns it. > > - MM > > > -Original Message- > From: flashcoders-boun...@chattyfig.figleaf.com [mailto: > flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Jer Brand > Sent: Friday, February 05, 2010 12:16 PM > To: Flash Coders List > Subject: Re: [Flashcoders] E4X, it's just not my day. > > Fixing that, your code works (I just added explicit var types). > > var artData:XML = new XML( > >s="Agrafiotis">an artist > He > sucks >s="Agrafiotis">She rocks > >); > > >var lastName:String="Agrafiotis"; > >var a:XMLList = > artData.bios.artistBio.(@s==lastName); >trace(a.toXMLString()) > >var b:XMLList = artData.bios.*.(@s==lastName); >trace(b.toXMLString()) ; > > > OUTPUTS: > > an artist > She rocks > an artist > She rocks > > > Jer > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] E4X, it's just not my day.
Sorry folks, that was a typo in the post. In my Flash file, it is indeed correctly formed XML. var e = artData.bios.artistBio.(@s==lastName); var d = artData.bios.*.(@s==lastName); There is something definitely weird going on in my code, because this is a simple E4X statement. Seriously, shouldn't e and d both return the one node that fits that criteria? In my class, e returns undefined, and d correctly returns it. - MM -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Jer Brand Sent: Friday, February 05, 2010 12:16 PM To: Flash Coders List Subject: Re: [Flashcoders] E4X, it's just not my day. Fixing that, your code works (I just added explicit var types). var artData:XML = new XML( an artist He sucks She rocks ); var lastName:String="Agrafiotis"; var a:XMLList = artData.bios.artistBio.(@s==lastName); trace(a.toXMLString()) var b:XMLList = artData.bios.*.(@s==lastName); trace(b.toXMLString()) ; OUTPUTS: an artist She rocks an artist She rocks Jer ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] E4X, it's just not my day.
Your artistBio closing tag is /artist, making it invalid XML. Hope it helps! Alan OK, why is this happening? var artData:XML = new XML( an artist He sucks She rocks ); var lastName="Agrafiotis"; // undefined var a = artData.bios.artistBio.(@s==lastName); // correctly finds the Peter Agrafiotis node var b = artData.bios.*.(@s==lastName); What am I missing in the difference between the two lines? - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X, it's just not my day.
Fixing that, your code works (I just added explicit var types). var artData:XML = new XML( an artist He sucks She rocks ); var lastName:String="Agrafiotis"; var a:XMLList = artData.bios.artistBio.(@s==lastName); trace(a.toXMLString()) var b:XMLList = artData.bios.*.(@s==lastName); trace(b.toXMLString()) ; OUTPUTS: an artist She rocks an artist She rocks Jer ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X, it's just not my day.
Just checking but, you did notice your XML isn't valid, right (this is just an contrived example?)? an artist terminating tag should be Jer ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] E4X, it's just not my day.
Your xml is malformed. an artist Should be: an artist Regards, Keith Reinfeld Home Page: http://keithreinfeld.home.comcast.net -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mendelsohn, Michael Sent: Friday, February 05, 2010 10:49 AM To: Flash Coders List Subject: RE: [Flashcoders] E4X, it's just not my day. OK, why is this happening? var artData:XML = new XML( an artist He sucks She rocks ); var lastName="Agrafiotis"; // undefined var a = artData.bios.artistBio.(@s==lastName); // correctly finds the Peter Agrafiotis node var b = artData.bios.*.(@s==lastName); What am I missing in the difference between the two lines? - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.733 / Virus Database: 271.1.1/2668 - Release Date: 02/05/10 01:35:00 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] E4X, it's just not my day.
OK, why is this happening? var artData:XML = new XML( an artist He sucks She rocks ); var lastName="Agrafiotis"; // undefined var a = artData.bios.artistBio.(@s==lastName); // correctly finds the Peter Agrafiotis node var b = artData.bios.*.(@s==lastName); What am I missing in the difference between the two lines? - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] E4X, it's just not my day.
Compare and contrast: var artData:XML = new XML( A longtime resident of Southern Maine, Peter Agrafiotis has always been fascinated with the timelessness of nature He sucks She rocks ); var lastName = "Agrafiotis"; var artistBio:XMLList = artData.bios.artist.(@s==lastName); trace(artistBio) That works fine for me. Jason Merrill Bank of America Global Learning Learning & Performance Soluions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mendelsohn, Michael Sent: Wednesday, February 03, 2010 1:19 PM To: Flash Coders List Subject: [Flashcoders] E4X, it's just not my day. Ugh! What am I missing here? //XML: var artData:XML = A longtime resident of Southern Maine, Peter Agrafiotis has always been fascinated with the timelessness of nature ; var lastName = "Agrafiotis"; var artistBio:XMLList = artData.bios.artist.(@s==lastName); // artistBio returns null -- WHY??? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X, it's just not my day.
can i also recommend you are a little more verbose with your attribute names? makes the whole thing much more readable a On Wed, Feb 3, 2010 at 6:27 PM, allandt bik-elliott (thefieldcomic.com) < alla...@gmail.com> wrote: > try tracing artistBio.length() (note the () - it's different to array) > > try also tracing artistBio.toString() and artistBio.toXMLString() > > a > > > On Wed, Feb 3, 2010 at 6:19 PM, Mendelsohn, Michael < > michael.mendels...@fmglobal.com> wrote: > >> Ugh! What am I missing here? >> >> //XML: >> var artData:XML = >> >>A longtime resident of Southern >> Maine, Peter Agrafiotis has always been fascinated with the timelessness of >> nature >> >> ; >> >> >> var lastName = "Agrafiotis"; >> var artistBio:XMLList = artData.bios.artist.(@s==lastName); >> >> // artistBio returns null -- WHY??? >> >> >> >> ___ >> Flashcoders mailing list >> Flashcoders@chattyfig.figleaf.com >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> > > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X, it's just not my day.
try tracing artistBio.length() (note the () - it's different to array) try also tracing artistBio.toString() and artistBio.toXMLString() a On Wed, Feb 3, 2010 at 6:19 PM, Mendelsohn, Michael < michael.mendels...@fmglobal.com> wrote: > Ugh! What am I missing here? > > //XML: > var artData:XML = > >A longtime resident of Southern > Maine, Peter Agrafiotis has always been fascinated with the timelessness of > nature > > ; > > > var lastName = "Agrafiotis"; > var artistBio:XMLList = artData.bios.artist.(@s==lastName); > > // artistBio returns null -- WHY??? > > > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] E4X, it's just not my day.
Ugh! What am I missing here? //XML: var artData:XML = A longtime resident of Southern Maine, Peter Agrafiotis has always been fascinated with the timelessness of nature ; var lastName = "Agrafiotis"; var artistBio:XMLList = artData.bios.artist.(@s==lastName); // artistBio returns null -- WHY??? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders