Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

textfields iOS not updated when the XML allready is updated

Participant ,
Jun 11, 2013 Jun 11, 2013

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.

TOPICS
ActionScript
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 12, 2013 Jun 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());

Translate
Community Expert ,
Jun 11, 2013 Jun 11, 2013

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 12, 2013 Jun 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2013 Jun 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());

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 12, 2013 Jun 12, 2013

Thanks a lot. I will try that out.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2013 Jun 12, 2013

sounds good.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 22, 2013 Aug 22, 2013

Took me some time to find out why I didn't succeed.

I finally succeeded in the way kglad suggested.

Problem was that when you close the app and later on open it the information for example a date/time through php/xml doesnot change.

That is untill you click something.

So  my test with just the date didnot seem to change anything.

But when I hit a button to another frame and send it back

The date/time are updated.

Thanks kglad for pointing me in the right direction.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 22, 2013 Aug 22, 2013
LATEST

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines