[jira] [Commented] (CB-6450) [WP8] XHRHelper incompatibility with Sencha Touch

2014-04-24 Thread Jesse MacFadyen (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13980295#comment-13980295
 ] 

Jesse MacFadyen commented on CB-6450:
-

Can you try this?

if (responseCode == '200') {
 alias.responseText = responseText;
 // MY CHANGE HERE
 alias.responseXML = DOMParser.parseFromString(responseText, 
"text/xml");
 // END
  }


> [WP8] XHRHelper incompatibility with Sencha Touch
> -
>
> Key: CB-6450
> URL: https://issues.apache.org/jira/browse/CB-6450
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: WP8
>Affects Versions: 3.4.0
> Environment: WP8, IE10
>Reporter: Marco Spinola Durante
>Assignee: Jesse MacFadyen
>Priority: Critical
>
> My app uses Cordova 3.4.0 & Sencha Touch successfully on iOS and Android. I 
> am extending support to WP8, but the app wont start correctly.
> The problem lies in the XHRHelper (probably in the injected JS code), because 
> if I load the app in the IE10 browser everything works fine.
> From Sencha Touch point of view loading of XML fails, although the reader 
> returns 200, I can see that the response.responseXML field is empty.
> I tried to edit the injected JS script and change as follows:
> {code:javascript}var funk = function () {
>window.__onXHRLocalCallback = function (responseCode, responseText) {
>   alias.status = responseCode;
>   if (responseCode == '200') {
>  alias.responseText = responseText;
>  // MY CHANGE HERE
>  alias.responseXML = responseText;
>  // END
>   }
>   else {
>  alias.onerror && alias.onerror(responseCode);
>   }
>   alias.changeReadyState(XHRShim.DONE);
>}
>alias.changeReadyState(XHRShim.LOADING);
>window.external.Notify('XHRLOCAL/' + resolvedUrl);
> }
> {code}
> but it didn't help.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6450) [WP8] XHRHelper incompatibility with Sencha Touch

2014-04-25 Thread Marco Spinola Durante (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13980818#comment-13980818
 ] 

Marco Spinola Durante commented on CB-6450:
---

the change gives me an unhanded exception:

{code}
An exception of type 'System.SystemException' occurred in 
Microsoft.Phone.Interop.ni.dll but was not handled in user code
{code}

at this line in XHRHelper.cs
{code}
Browser.InvokeScript("__onXHRLocalCallback", new string[] { "200", text });
{code}

> [WP8] XHRHelper incompatibility with Sencha Touch
> -
>
> Key: CB-6450
> URL: https://issues.apache.org/jira/browse/CB-6450
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: WP8
>Affects Versions: 3.4.0
> Environment: WP8, IE10
>Reporter: Marco Spinola Durante
>Assignee: Jesse MacFadyen
>Priority: Critical
>
> My app uses Cordova 3.4.0 & Sencha Touch successfully on iOS and Android. I 
> am extending support to WP8, but the app wont start correctly.
> The problem lies in the XHRHelper (probably in the injected JS code), because 
> if I load the app in the IE10 browser everything works fine.
> From Sencha Touch point of view loading of XML fails, although the reader 
> returns 200, I can see that the response.responseXML field is empty.
> I tried to edit the injected JS script and change as follows:
> {code:javascript}var funk = function () {
>window.__onXHRLocalCallback = function (responseCode, responseText) {
>   alias.status = responseCode;
>   if (responseCode == '200') {
>  alias.responseText = responseText;
>  // MY CHANGE HERE
>  alias.responseXML = responseText;
>  // END
>   }
>   else {
>  alias.onerror && alias.onerror(responseCode);
>   }
>   alias.changeReadyState(XHRShim.DONE);
>}
>alias.changeReadyState(XHRShim.LOADING);
>window.external.Notify('XHRLOCAL/' + resolvedUrl);
> }
> {code}
> but it didn't help.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6450) [WP8] XHRHelper incompatibility with Sencha Touch

2014-04-25 Thread Jesse MacFadyen (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13981563#comment-13981563
 ] 

Jesse MacFadyen commented on CB-6450:
-

Okay, my mistake.

{code}
if (responseCode == '200') {
 alias.responseText = responseText;
 // MY CHANGE HERE
 var dp = new DOMParser();
alias.responseXML = dp.parseFromString(xhr.responseText, 
"text/xml");
 // END
  }

{code}

I will be formalizing this soon, as it should be a getter, but that should get 
you through till the update. 

> [WP8] XHRHelper incompatibility with Sencha Touch
> -
>
> Key: CB-6450
> URL: https://issues.apache.org/jira/browse/CB-6450
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: WP8
>Affects Versions: 3.4.0
> Environment: WP8, IE10
>Reporter: Marco Spinola Durante
>Assignee: Jesse MacFadyen
>Priority: Critical
>
> My app uses Cordova 3.4.0 & Sencha Touch successfully on iOS and Android. I 
> am extending support to WP8, but the app wont start correctly.
> The problem lies in the XHRHelper (probably in the injected JS code), because 
> if I load the app in the IE10 browser everything works fine.
> From Sencha Touch point of view loading of XML fails, although the reader 
> returns 200, I can see that the response.responseXML field is empty.
> I tried to edit the injected JS script and change as follows:
> {code:javascript}var funk = function () {
>window.__onXHRLocalCallback = function (responseCode, responseText) {
>   alias.status = responseCode;
>   if (responseCode == '200') {
>  alias.responseText = responseText;
>  // MY CHANGE HERE
>  alias.responseXML = responseText;
>  // END
>   }
>   else {
>  alias.onerror && alias.onerror(responseCode);
>   }
>   alias.changeReadyState(XHRShim.DONE);
>}
>alias.changeReadyState(XHRShim.LOADING);
>window.external.Notify('XHRLOCAL/' + resolvedUrl);
> }
> {code}
> but it didn't help.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6450) [WP8] XHRHelper incompatibility with Sencha Touch

2014-04-25 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13981590#comment-13981590
 ] 

ASF subversion and git services commented on CB-6450:
-

Commit 67715e0294c362a0ee9585ec8165d47a95fc4964 in cordova-wp8's branch 
refs/heads/master from [~purplecabbage]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-wp8.git;h=67715e0 ]

CB-6450 added support for local XHR.responseXML getter


> [WP8] XHRHelper incompatibility with Sencha Touch
> -
>
> Key: CB-6450
> URL: https://issues.apache.org/jira/browse/CB-6450
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: WP8
>Affects Versions: 3.4.0
> Environment: WP8, IE10
>Reporter: Marco Spinola Durante
>Assignee: Jesse MacFadyen
>Priority: Critical
>
> My app uses Cordova 3.4.0 & Sencha Touch successfully on iOS and Android. I 
> am extending support to WP8, but the app wont start correctly.
> The problem lies in the XHRHelper (probably in the injected JS code), because 
> if I load the app in the IE10 browser everything works fine.
> From Sencha Touch point of view loading of XML fails, although the reader 
> returns 200, I can see that the response.responseXML field is empty.
> I tried to edit the injected JS script and change as follows:
> {code:javascript}var funk = function () {
>window.__onXHRLocalCallback = function (responseCode, responseText) {
>   alias.status = responseCode;
>   if (responseCode == '200') {
>  alias.responseText = responseText;
>  // MY CHANGE HERE
>  alias.responseXML = responseText;
>  // END
>   }
>   else {
>  alias.onerror && alias.onerror(responseCode);
>   }
>   alias.changeReadyState(XHRShim.DONE);
>}
>alias.changeReadyState(XHRShim.LOADING);
>window.external.Notify('XHRLOCAL/' + resolvedUrl);
> }
> {code}
> but it didn't help.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6450) [WP8] XHRHelper incompatibility with Sencha Touch

2014-04-25 Thread Jesse MacFadyen (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13981584#comment-13981584
 ] 

Jesse MacFadyen commented on CB-6450:
-

My upcoming commit will be the following change :

{code}
if (responseCode == '200') {
alias.responseText = responseText;
Object.defineProperty(alias, 'responseXML', {
get: function () {
return new DOMParser().parseFromString(this.responseText, 
'text/xml');
}
});
}
{code}

I have verified this with the following :
{code}
function loadMeSomeXHR() {

var xhr = new XMLHttpRequest();
xhr.open("GET", "../config.xml", true);
xhr.onload = function () {
console.log("loaded!");
try {
var responseXML = xhr.responseXML;
console.log("responseXML: origin= " + 
responseXML.getElementsByTagName('access')[0].getAttribute('origin'));
}
catch (e) {
console.log(e);
}
}
xhr.send();
}
{code}

> [WP8] XHRHelper incompatibility with Sencha Touch
> -
>
> Key: CB-6450
> URL: https://issues.apache.org/jira/browse/CB-6450
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: WP8
>Affects Versions: 3.4.0
> Environment: WP8, IE10
>Reporter: Marco Spinola Durante
>Assignee: Jesse MacFadyen
>Priority: Critical
>
> My app uses Cordova 3.4.0 & Sencha Touch successfully on iOS and Android. I 
> am extending support to WP8, but the app wont start correctly.
> The problem lies in the XHRHelper (probably in the injected JS code), because 
> if I load the app in the IE10 browser everything works fine.
> From Sencha Touch point of view loading of XML fails, although the reader 
> returns 200, I can see that the response.responseXML field is empty.
> I tried to edit the injected JS script and change as follows:
> {code:javascript}var funk = function () {
>window.__onXHRLocalCallback = function (responseCode, responseText) {
>   alias.status = responseCode;
>   if (responseCode == '200') {
>  alias.responseText = responseText;
>  // MY CHANGE HERE
>  alias.responseXML = responseText;
>  // END
>   }
>   else {
>  alias.onerror && alias.onerror(responseCode);
>   }
>   alias.changeReadyState(XHRShim.DONE);
>}
>alias.changeReadyState(XHRShim.LOADING);
>window.external.Notify('XHRLOCAL/' + resolvedUrl);
> }
> {code}
> but it didn't help.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6450) [WP8] XHRHelper incompatibility with Sencha Touch

2014-08-13 Thread JIRA

[ 
https://issues.apache.org/jira/browse/CB-6450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14095829#comment-14095829
 ] 

Vinícius Gonçalves commented on CB-6450:


This line: {code}
Object.defineProperty(alias, 'responseXML', {
get: function () {
 return new 
DOMParser().parseFromString(this.responseText, 'text/xml');
}
});
{code} 
produce an error when I try to load a local json file in a Ajax Sencha Touch 
request, when I using WP8.

> [WP8] XHRHelper incompatibility with Sencha Touch
> -
>
> Key: CB-6450
> URL: https://issues.apache.org/jira/browse/CB-6450
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: WP8
>Affects Versions: 3.4.0
> Environment: WP8, IE10
>Reporter: Marco Spinola Durante
>Assignee: Jesse MacFadyen
>Priority: Critical
> Fix For: 3.5.0
>
>
> My app uses Cordova 3.4.0 & Sencha Touch successfully on iOS and Android. I 
> am extending support to WP8, but the app wont start correctly.
> The problem lies in the XHRHelper (probably in the injected JS code), because 
> if I load the app in the IE10 browser everything works fine.
> From Sencha Touch point of view loading of XML fails, although the reader 
> returns 200, I can see that the response.responseXML field is empty.
> I tried to edit the injected JS script and change as follows:
> {code:javascript}var funk = function () {
>window.__onXHRLocalCallback = function (responseCode, responseText) {
>   alias.status = responseCode;
>   if (responseCode == '200') {
>  alias.responseText = responseText;
>  // MY CHANGE HERE
>  alias.responseXML = responseText;
>  // END
>   }
>   else {
>  alias.onerror && alias.onerror(responseCode);
>   }
>   alias.changeReadyState(XHRShim.DONE);
>}
>alias.changeReadyState(XHRShim.LOADING);
>window.external.Notify('XHRLOCAL/' + resolvedUrl);
> }
> {code}
> but it didn't help.



--
This message was sent by Atlassian JIRA
(v6.2#6252)