Skip to main content
Inspiring
June 11, 2013
Answered

textfields iOS not updated when the XML allready is updated

  • June 11, 2013
  • 1 reply
  • 1163 views

Hi,

I am testing an app for iOS and later on also for Android. I am using an XML from PHP with and also without a MySQL database.

In one case I only use the current date to be published in the app in a textfield. Problem is that to get all ML connected textfields updated even when the XML allready is updated I have to completely restart the iPod Touch which I use to test on. Is there a way that the user is able to push a button to manually update the app without closing down the device? In addition, is there away that the app automaticaly refreshes its content?

Any help is greatly appreciated.

This topic has been closed for replies.
Correct answer kglad

i don't understand your issue.

but, if you're trying to reload your xml and it's being retrieved from a cache, you can prevent that by appending a changing query string to the url. for example, instead of:

var url:URLRequest=new URLRequest("php/getXML.php");

use:

var url:URLRequest=new URLRequest("php/getXML.php?rannum="+Math.random());

1 reply

kglad
Community Expert
Community Expert
June 11, 2013

what happens that updates your textfield when your app starts and that does not happen when you try to manually update?

Inspiring
June 12, 2013

Thanks for responding. I don't understand what you mean but it might be a good idea to see what happens if (if possible) I import the xml when hitting a button. At this moment the code is executed when the app starts. It seems that the external-xml is stored in memory until the device is restarted. Which is not allways a disadvantage.

Thanks for bringing up idea of it that what you meant.

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
June 12, 2013

i don't understand your issue.

but, if you're trying to reload your xml and it's being retrieved from a cache, you can prevent that by appending a changing query string to the url. for example, instead of:

var url:URLRequest=new URLRequest("php/getXML.php");

use:

var url:URLRequest=new URLRequest("php/getXML.php?rannum="+Math.random());