[jira] [Commented] (CB-6763) Simultaneous local XHRs on WP8 returns incorrect result

2014-12-03 Thread Vladimir Kotikov (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14233984#comment-14233984
 ] 

Vladimir Kotikov commented on CB-6763:
--

Hi, Koen. This was released in 3.7.0. See 
https://github.com/apache/cordova-wp8/commit/efaf559ae846567e68e4d96446c8760c3ceed8fc

 Simultaneous local XHRs on WP8 returns incorrect result
 ---

 Key: CB-6763
 URL: https://issues.apache.org/jira/browse/CB-6763
 Project: Apache Cordova
  Issue Type: Bug
  Components: WP8
Affects Versions: 3.4.0
Reporter: Vladimir Kotikov
Assignee: Jesse MacFadyen
  Labels: wp8, xhr, xhrhelper

 When try to get content of multiple local files via XHR, all requests return 
 responses with same content. E.g. following code (using jQuery)
 {noformat}
 function loadTemplates (views) {
 var deferreds = [];
 $.each(views, function (index, view) {
 var vURL = 'tpl/' + view + '.html';
 deferreds.push($.get(vURL, function (data) {
 console.log(data)
 }, 'html'));
 })
 }
 loadTemplates([HomeView, ContactView, ShellView, EmployeeView, 
 EmployeeSummaryView, EmployeeListItemView]);
 {noformat}
 will print contents of {{tpl/EmployeeListItemView.html}} 6 times.
 The problem is when new local XHR is sent, it overrides 
 {{__onXHRLocalCallback}} callback, already created by previous request.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-6763) Simultaneous local XHRs on WP8 returns incorrect result

2014-11-27 Thread Koen Jans (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14227430#comment-14227430
 ] 

Koen Jans commented on CB-6763:
---

Hey Vladimir,

Was this PR released with version 3.6.0?

We're facing this issue with a build coming from build.phonegap.com, running on 
version 3.6.3.
When I decompile the wp xap package - XHRHelper.cs, the changes from this PR 
seem not to be present.


Thanks for your time,
Koen


 Simultaneous local XHRs on WP8 returns incorrect result
 ---

 Key: CB-6763
 URL: https://issues.apache.org/jira/browse/CB-6763
 Project: Apache Cordova
  Issue Type: Bug
  Components: WP8
Affects Versions: 3.4.0
Reporter: Vladimir Kotikov
Assignee: Jesse MacFadyen
  Labels: wp8, xhr, xhrhelper

 When try to get content of multiple local files via XHR, all requests return 
 responses with same content. E.g. following code (using jQuery)
 {noformat}
 function loadTemplates (views) {
 var deferreds = [];
 $.each(views, function (index, view) {
 var vURL = 'tpl/' + view + '.html';
 deferreds.push($.get(vURL, function (data) {
 console.log(data)
 }, 'html'));
 })
 }
 loadTemplates([HomeView, ContactView, ShellView, EmployeeView, 
 EmployeeSummaryView, EmployeeListItemView]);
 {noformat}
 will print contents of {{tpl/EmployeeListItemView.html}} 6 times.
 The problem is when new local XHR is sent, it overrides 
 {{__onXHRLocalCallback}} callback, already created by previous request.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-6763) Simultaneous local XHRs on WP8 returns incorrect result

2014-08-21 Thread Vladimir Kotikov (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14105236#comment-14105236
 ] 

Vladimir Kotikov commented on CB-6763:
--

Seems that problem is it test. It changes window.location (probably, it's a bad 
practice), and this cleans XHR callbacks cache, so callbacks for any pending 
XHR's are never called.
I've cretaed an issue to track this: 
https://issues.apache.org/jira/browse/CB-7356

 Simultaneous local XHRs on WP8 returns incorrect result
 ---

 Key: CB-6763
 URL: https://issues.apache.org/jira/browse/CB-6763
 Project: Apache Cordova
  Issue Type: Bug
  Components: WP8
Affects Versions: 3.4.0
Reporter: Vladimir Kotikov
Assignee: Jesse MacFadyen
  Labels: wp8, xhr, xhrhelper

 When try to get content of multiple local files via XHR, all requests return 
 responses with same content. E.g. following code (using jQuery)
 {noformat}
 function loadTemplates (views) {
 var deferreds = [];
 $.each(views, function (index, view) {
 var vURL = 'tpl/' + view + '.html';
 deferreds.push($.get(vURL, function (data) {
 console.log(data)
 }, 'html'));
 })
 }
 loadTemplates([HomeView, ContactView, ShellView, EmployeeView, 
 EmployeeSummaryView, EmployeeListItemView]);
 {noformat}
 will print contents of {{tpl/EmployeeListItemView.html}} 6 times.
 The problem is when new local XHR is sent, it overrides 
 {{__onXHRLocalCallback}} callback, already created by previous request.



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


[jira] [Commented] (CB-6763) Simultaneous local XHRs on WP8 returns incorrect result

2014-08-21 Thread Vladimir Kotikov (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14105237#comment-14105237
 ] 

Vladimir Kotikov commented on CB-6763:
--

Hey, Julien. This should be released at 3.6.0, which is coming soon.

 Simultaneous local XHRs on WP8 returns incorrect result
 ---

 Key: CB-6763
 URL: https://issues.apache.org/jira/browse/CB-6763
 Project: Apache Cordova
  Issue Type: Bug
  Components: WP8
Affects Versions: 3.4.0
Reporter: Vladimir Kotikov
Assignee: Jesse MacFadyen
  Labels: wp8, xhr, xhrhelper

 When try to get content of multiple local files via XHR, all requests return 
 responses with same content. E.g. following code (using jQuery)
 {noformat}
 function loadTemplates (views) {
 var deferreds = [];
 $.each(views, function (index, view) {
 var vURL = 'tpl/' + view + '.html';
 deferreds.push($.get(vURL, function (data) {
 console.log(data)
 }, 'html'));
 })
 }
 loadTemplates([HomeView, ContactView, ShellView, EmployeeView, 
 EmployeeSummaryView, EmployeeListItemView]);
 {noformat}
 will print contents of {{tpl/EmployeeListItemView.html}} 6 times.
 The problem is when new local XHR is sent, it overrides 
 {{__onXHRLocalCallback}} callback, already created by previous request.



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


[jira] [Commented] (CB-6763) Simultaneous local XHRs on WP8 returns incorrect result

2014-08-21 Thread Julien Carnec (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14105250#comment-14105250
 ] 

Julien Carnec commented on CB-6763:
---

Thank you Vladimir

 Simultaneous local XHRs on WP8 returns incorrect result
 ---

 Key: CB-6763
 URL: https://issues.apache.org/jira/browse/CB-6763
 Project: Apache Cordova
  Issue Type: Bug
  Components: WP8
Affects Versions: 3.4.0
Reporter: Vladimir Kotikov
Assignee: Jesse MacFadyen
  Labels: wp8, xhr, xhrhelper

 When try to get content of multiple local files via XHR, all requests return 
 responses with same content. E.g. following code (using jQuery)
 {noformat}
 function loadTemplates (views) {
 var deferreds = [];
 $.each(views, function (index, view) {
 var vURL = 'tpl/' + view + '.html';
 deferreds.push($.get(vURL, function (data) {
 console.log(data)
 }, 'html'));
 })
 }
 loadTemplates([HomeView, ContactView, ShellView, EmployeeView, 
 EmployeeSummaryView, EmployeeListItemView]);
 {noformat}
 will print contents of {{tpl/EmployeeListItemView.html}} 6 times.
 The problem is when new local XHR is sent, it overrides 
 {{__onXHRLocalCallback}} callback, already created by previous request.



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


[jira] [Commented] (CB-6763) Simultaneous local XHRs on WP8 returns incorrect result

2014-08-20 Thread Martin Gonzalez (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14103836#comment-14103836
 ] 

Martin Gonzalez commented on CB-6763:
-

Hi Vlad, the commit that resolved this issue it's making fail the spec 6 on the 
'local XHR tests' from mobile spec, do you have any idea why is this happening?

 Simultaneous local XHRs on WP8 returns incorrect result
 ---

 Key: CB-6763
 URL: https://issues.apache.org/jira/browse/CB-6763
 Project: Apache Cordova
  Issue Type: Bug
  Components: WP8
Affects Versions: 3.4.0
Reporter: Vladimir Kotikov
Assignee: Jesse MacFadyen
  Labels: wp8, xhr, xhrhelper

 When try to get content of multiple local files via XHR, all requests return 
 responses with same content. E.g. following code (using jQuery)
 {noformat}
 function loadTemplates (views) {
 var deferreds = [];
 $.each(views, function (index, view) {
 var vURL = 'tpl/' + view + '.html';
 deferreds.push($.get(vURL, function (data) {
 console.log(data)
 }, 'html'));
 })
 }
 loadTemplates([HomeView, ContactView, ShellView, EmployeeView, 
 EmployeeSummaryView, EmployeeListItemView]);
 {noformat}
 will print contents of {{tpl/EmployeeListItemView.html}} 6 times.
 The problem is when new local XHR is sent, it overrides 
 {{__onXHRLocalCallback}} callback, already created by previous request.



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


[jira] [Commented] (CB-6763) Simultaneous local XHRs on WP8 returns incorrect result

2014-08-18 Thread Julien Carnec (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14100454#comment-14100454
 ] 

Julien Carnec commented on CB-6763:
---

Hi,
In which Cordova version will this fix be available?

 Simultaneous local XHRs on WP8 returns incorrect result
 ---

 Key: CB-6763
 URL: https://issues.apache.org/jira/browse/CB-6763
 Project: Apache Cordova
  Issue Type: Bug
  Components: WP8
Affects Versions: 3.4.0
Reporter: Vladimir Kotikov
Assignee: Jesse MacFadyen
  Labels: wp8, xhr, xhrhelper

 When try to get content of multiple local files via XHR, all requests return 
 responses with same content. E.g. following code (using jQuery)
 {noformat}
 function loadTemplates (views) {
 var deferreds = [];
 $.each(views, function (index, view) {
 var vURL = 'tpl/' + view + '.html';
 deferreds.push($.get(vURL, function (data) {
 console.log(data)
 }, 'html'));
 })
 }
 loadTemplates([HomeView, ContactView, ShellView, EmployeeView, 
 EmployeeSummaryView, EmployeeListItemView]);
 {noformat}
 will print contents of {{tpl/EmployeeListItemView.html}} 6 times.
 The problem is when new local XHR is sent, it overrides 
 {{__onXHRLocalCallback}} callback, already created by previous request.



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


[jira] [Commented] (CB-6763) Simultaneous local XHRs on WP8 returns incorrect result

2014-08-14 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14097832#comment-14097832
 ] 

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

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

Merge branch 'CB-6763' of https://github.com/MSOpenTech/cordova-wp8


 Simultaneous local XHRs on WP8 returns incorrect result
 ---

 Key: CB-6763
 URL: https://issues.apache.org/jira/browse/CB-6763
 Project: Apache Cordova
  Issue Type: Bug
  Components: WP8
Affects Versions: 3.4.0
Reporter: Vladimir Kotikov
Assignee: Jesse MacFadyen
  Labels: wp8, xhr, xhrhelper

 When try to get content of multiple local files via XHR, all requests return 
 responses with same content. E.g. following code (using jQuery)
 {noformat}
 function loadTemplates (views) {
 var deferreds = [];
 $.each(views, function (index, view) {
 var vURL = 'tpl/' + view + '.html';
 deferreds.push($.get(vURL, function (data) {
 console.log(data)
 }, 'html'));
 })
 }
 loadTemplates([HomeView, ContactView, ShellView, EmployeeView, 
 EmployeeSummaryView, EmployeeListItemView]);
 {noformat}
 will print contents of {{tpl/EmployeeListItemView.html}} 6 times.
 The problem is when new local XHR is sent, it overrides 
 {{__onXHRLocalCallback}} callback, already created by previous request.



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


[jira] [Commented] (CB-6763) Simultaneous local XHRs on WP8 returns incorrect result

2014-08-14 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14097831#comment-14097831
 ] 

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

Commit efaf559ae846567e68e4d96446c8760c3ceed8fc in cordova-wp8's branch 
refs/heads/master from [~vladimir.kotikov]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-wp8.git;h=efaf559 ]

[CB-6763] Fixes issue when multiple simultaneous requests are sent.


 Simultaneous local XHRs on WP8 returns incorrect result
 ---

 Key: CB-6763
 URL: https://issues.apache.org/jira/browse/CB-6763
 Project: Apache Cordova
  Issue Type: Bug
  Components: WP8
Affects Versions: 3.4.0
Reporter: Vladimir Kotikov
Assignee: Jesse MacFadyen
  Labels: wp8, xhr, xhrhelper

 When try to get content of multiple local files via XHR, all requests return 
 responses with same content. E.g. following code (using jQuery)
 {noformat}
 function loadTemplates (views) {
 var deferreds = [];
 $.each(views, function (index, view) {
 var vURL = 'tpl/' + view + '.html';
 deferreds.push($.get(vURL, function (data) {
 console.log(data)
 }, 'html'));
 })
 }
 loadTemplates([HomeView, ContactView, ShellView, EmployeeView, 
 EmployeeSummaryView, EmployeeListItemView]);
 {noformat}
 will print contents of {{tpl/EmployeeListItemView.html}} 6 times.
 The problem is when new local XHR is sent, it overrides 
 {{__onXHRLocalCallback}} callback, already created by previous request.



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


[jira] [Commented] (CB-6763) Simultaneous local XHRs on WP8 returns incorrect result

2014-08-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14097836#comment-14097836
 ] 

ASF GitHub Bot commented on CB-6763:


Github user asfgit closed the pull request at:

https://github.com/apache/cordova-wp8/pull/37


 Simultaneous local XHRs on WP8 returns incorrect result
 ---

 Key: CB-6763
 URL: https://issues.apache.org/jira/browse/CB-6763
 Project: Apache Cordova
  Issue Type: Bug
  Components: WP8
Affects Versions: 3.4.0
Reporter: Vladimir Kotikov
Assignee: Jesse MacFadyen
  Labels: wp8, xhr, xhrhelper

 When try to get content of multiple local files via XHR, all requests return 
 responses with same content. E.g. following code (using jQuery)
 {noformat}
 function loadTemplates (views) {
 var deferreds = [];
 $.each(views, function (index, view) {
 var vURL = 'tpl/' + view + '.html';
 deferreds.push($.get(vURL, function (data) {
 console.log(data)
 }, 'html'));
 })
 }
 loadTemplates([HomeView, ContactView, ShellView, EmployeeView, 
 EmployeeSummaryView, EmployeeListItemView]);
 {noformat}
 will print contents of {{tpl/EmployeeListItemView.html}} 6 times.
 The problem is when new local XHR is sent, it overrides 
 {{__onXHRLocalCallback}} callback, already created by previous request.



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


[jira] [Commented] (CB-6763) Simultaneous local XHRs on WP8 returns incorrect result

2014-05-27 Thread Jesse MacFadyen (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14010287#comment-14010287
 ] 

Jesse MacFadyen commented on CB-6763:
-

The example above is a classic closure issue, and not related to the XHRHelper 
class, or the JS code it injects.

From : 
http://stackoverflow.com/questions/750486/javascript-closure-inside-loops-simple-practical-example
{code}
var funcs = [];
for (var i = 0; i  3; i++) {  // let's create 3 functions
funcs[i] = function() {// and store them in funcs
console.log(My value:  + i); // each should log its value.
};
}
for (var j = 0; j  3; j++) {
funcs[j]();// and now let's run each one to see
}
{code}

My value: 3
My value: 3
My value: 3

 Simultaneous local XHRs on WP8 returns incorrect result
 ---

 Key: CB-6763
 URL: https://issues.apache.org/jira/browse/CB-6763
 Project: Apache Cordova
  Issue Type: Bug
  Components: WP8
Affects Versions: 3.4.0
Reporter: Vladimir Kotikov
Assignee: Jesse MacFadyen
  Labels: wp8, xhr, xhrhelper

 When try to get content of multiple local files via XHR, all requests return 
 responses with same content. E.g. following code (using jQuery)
 {noformat}
 function loadTemplates (views) {
 var deferreds = [];
 $.each(views, function (index, view) {
 var vURL = 'tpl/' + view + '.html';
 deferreds.push($.get(vURL, function (data) {
 console.log(data)
 }, 'html'));
 })
 }
 loadTemplates([HomeView, ContactView, ShellView, EmployeeView, 
 EmployeeSummaryView, EmployeeListItemView]);
 {noformat}
 will print contents of {{tpl/EmployeeListItemView.html}} 6 times.
 The problem is when new local XHR is sent, it overrides 
 {{__onXHRLocalCallback}} callback, already created by previous request.



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