Thanks, I will give it a try today. -----Original Message----- From: Harbs [mailto:harbs.li...@gmail.com] Sent: Friday, August 4, 2017 8:20 AM To: dev@flex.apache.org Subject: Re: XML hasOwnProperty method
I just committed some code which I think fixes IE. Harbs > On Jul 31, 2017, at 11:40 PM, Jim Norris <jim.nor...@e-work.com> wrote: > > Hi- > > I installed the Apache FlexJS Nightly using the SDK Installer and adjusted > the project compiler to the new SDK, but I am still seeing failures with the > handleOwnProperty method. I will try to do some additional debugging > tomorrow to see where the problem is coming from. > > In the meantime I used the work around you mentioned and got a component > working correctly in Firefox. However, I am getting a syntax error in > Internet Explorer when creating the XML object (the same function works in > Firefox, both using the same XML file). Specifically the issue is at this > line in XML.js: > > var /** @type {string} */ errorNS = > org.apache.flex.utils.Language.string(parser.parseFromString('<', > 'application/xml').getElementsByTagName("parsererror")[0].namespaceURI > ); > > In Firefox this line works without issue, but in IE I see a syntax error in > the debugger. > > I did a little research and it seems this may be an issue specific to IE11, > although it is a little unclear to me how best to fix it. > > https://stackoverflow.com/questions/23022956/internet-explorer-11-ie-1 > 1-throws-syntax-error-using-parsefromstring-in-dompar > https://stackoverflow.com/questions/31277058/parsefromstring-throws-er > ror-in-ie-but-not-in-chrome?noredirect=1&lq=1 > > Let me know if I can provide any additional info. > > > > > Thanks, > > Jim > > -----Original Message----- > From: Harbs [mailto:harbs.li...@gmail.com] > Sent: Sunday, July 30, 2017 4:37 PM > To: dev@flex.apache.org > Subject: Re: XML hasOwnProperty method > > There are quite a few fixes to XML in particular in the nightly, so I would > recommend that you use the nightly anyway. > > If you need help getting the nightly, let us know. > > Thanks, > Harbs > >> On Jul 30, 2017, at 11:05 PM, Jim Norris <jim.nor...@e-work.com> wrote: >> >> That's great news! I am using 0.8 right now although I may need to get this >> update to be able to progress much further. >> >> >> >> Thanks, >> >> Jim >> >> -----Original Message----- >> From: Harbs [mailto:harbs.li...@gmail.com] >> Sent: Sunday, July 30, 2017 3:47 PM >> To: dev@flex.apache.org >> Subject: Re: XML hasOwnProperty method >> >> I just tried this and I see the problem. >> >> I should have it fixed soon… >> >>> On Jul 30, 2017, at 10:38 PM, Harbs <harbs.li...@gmail.com> wrote: >>> >>> Hi Jim, >>> >>> Do you get some kind of error when you do this? Are you using 0.8.0 or the >>> nightly? >>> >>> I don’t think hasOwnProperty is something I personally use, so I wouldn’t >>> be too surprised if there are issues there. >>> >>> (FWIW, you should be able to use >>> if(resourceXML.@collapsible.length()) >>> as a workaround.) >>> >>> Thanks, >>> Harbs >>> >>>> On Jul 30, 2017, at 9:56 PM, Jim Norris <jim.nor...@e-work.com> wrote: >>>> >>>> This may be for Harbs as I think he did a lot of the work for XML. >>>> >>>> >>>> >>>> I am working on some existing Flex code and trying to convert >>>> portions of it to FlexJS. As part of the application it loads a >>>> lot of XML files and uses E4X to parse them. I was able to get >>>> this working quickly in swf format, so that was awesome! >>>> >>>> >>>> >>>> However, I am having a problem with the hasOwnProperty method. It >>>> works fine running in swf format, but when I export to HTML/JS the >>>> Javascript bombs on the hasOwnProperty method calls. If I remove >>>> them the code executes as it should. >>>> >>>> >>>> >>>> I checked here >>>> (https://cwiki.apache.org/confluence/display/FLEX/E4X+Observations) >>>> and it seems like they should be working but I wanted to check if I >>>> am doing something I should not. >>>> >>>> >>>> >>>> >>>> >>>> Typically these checks look like this in AS: >>>> >>>> >>>> >>>> if (resourceXML.hasOwnProperty("@collapsible") == true){ >>>> >>>> globalCollapsible = toBoolean(resourceXML.@collapsible); >>>> >>>> }else{ >>>> >>>> _globalCollapsible = false; >>>> >>>> } >>>> >>>> >>>> >>>> And look like this in the JS (the last alert I message I see is the >>>> 'checking global property'): >>>> >>>> >>>> >>>> alert('TextViewer checking global property'); >>>> >>>> if (resourceXML.hasOwnProperty("@collapsible") == true) { >>>> >>>> alert('TextViewer.init found global property'); >>>> >>>> this._globalCollapsible = >>>> this.toBoolean(resourceXML.attribute('collapsible')); >>>> >>>> } else { >>>> >>>> alert('TextViewer.init global property not found'); >>>> >>>> this._globalCollapsible = false; >>>> >>>> } >>>> >>>> >>>> >>>> >>>> >>>> I have a ton of these types of checks in my code so any insight you >>>> may have into either 1) what is wrong, or 2) what I should do >>>> instead would be a lot of help. >>>> >>>> >>>> >>>> >>>> >>>> Thanks, >>>> >>>> >>>> >>>> Jim >>>> >>> >> >> > >