uploading and downloading data at the web

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
abartolome
Posts: 2
Joined: Sun Oct 03, 2010 1:14 am
Contact:

uploading and downloading data at the web

Post by abartolome »

At IOS, it seems that the only way to send data to a server is POST command.
I undertand that I can use POST to send data to a cgi script, which could return to me some new data.
It runs at MAC OSX stacks.

THE QUESTION
When a do a POST command at IOS, where can I find the returned buffer?
At MAC OSX I can use "it" variable.

ie.
post vdata to URL vURL
put it into field myfield
splash21
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 369
Joined: Sun Dec 19, 2010 1:10 am
Contact:

Re: uploading and downloading data at the web

Post by splash21 »

Hi, I just tried it with a quick app with one button;

Code: Select all

on mouseUp
   post "apple=1" to url "http://www.splash21.com/banana.php"
   answer it
end mouseUp
It worked OK on my iPod touch - just returns a random string.
:D
LiveCode Development & Training : http://splash21.com
abartolome
Posts: 2
Joined: Sun Oct 03, 2010 1:14 am
Contact:

Re: uploading and downloading data at the web

Post by abartolome »

Thanks very much.

But it does not work. I have checked your script copies and pasted to a button without results.

In fact, POST commands runs OK at the MAC OSX stack but they do not at Simulator IOS.

Some suggestion? Perhaps about simulator version (I've the last one)? Any problem with configuration?

Thanks
splash21
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 369
Joined: Sun Dec 19, 2010 1:10 am
Contact:

Re: uploading and downloading data at the web

Post by splash21 »

LiveCode 4.5.2 (Macbook Pro)
iOS Simulator 4.2 (235)

Works in stack, in simulator and on device (iPod touch 1st generation) :)

Not sure why it doesn't work for you :(
LiveCode Development & Training : http://splash21.com
JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: uploading and downloading data at the web

Post by JosepM »

Also work for me..

Salut,
Josep
murmac
Posts: 4
Joined: Tue Jan 11, 2011 4:04 pm

Re: uploading and downloading data at the web

Post by murmac »

Thanks very much.

But it does not work. I have checked your script copies and pasted to a button without results.

In fact, POST commands runs OK at the MAC OSX stack but they do not at Simulator IOS.

Some suggestion? Perhaps about simulator version (I've the last one)? Any problem with configuration?

Thanks
Doesn't work for me too.
Kangaroo SW
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 40
Joined: Sat Jan 15, 2011 10:57 am

Re: uploading and downloading data at the web

Post by Kangaroo SW »

Try it on a real device !

Cheers
Rolf :D
Post Reply