This is a migrated thread and some comments may be shown as answers.

All functions are firing twice

2 Answers 65 Views
NativeScript Insiders
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Akhil
Top achievements
Rank 1
Akhil asked on 16 Jan 2015, 07:42 PM
I'm not sure if this is an issue with my code or a bug with NativeScript - but all of my functions are firing twice. I.e. I have a function that sends an email to clients and then creates a dialog asking for a confirmation code. Two emails are being sent and two dialogs are appearing (one after another). Is anyone else experiencing this?

2 Answers, 1 is accepted

Sort by
0
Akhil
Top achievements
Rank 1
answered on 16 Jan 2015, 11:29 PM
Resolved: I realized that my pageLoad function (which fires when the page is loaded) was firing twice, and so all of the functions chained to this were firing twice as well. I found a way around this by setting a global variable firstCall to true initially, and then set it to false the first time the pageLoad function is called, thereby preventing it from firing again.
0
Vlad
Telerik team
answered on 19 Jan 2015, 07:41 AM
Hi,

This issue is already resolved (page load fired twice) and you will not have such problems with our next version!

Regards,
Vlad
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
NativeScript Insiders
Asked by
Akhil
Top achievements
Rank 1
Answers by
Akhil
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or