Put ang Get Url Blocking Dev Problems On Livecode 5.5.1

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Fasasoftware
Posts: 203
Joined: Mon Oct 31, 2011 9:36 pm
Contact:

Put ang Get Url Blocking Dev Problems On Livecode 5.5.1

Post by Fasasoftware » Fri Aug 10, 2012 2:19 pm

Dear Friends,

There are serious problems blocking the development! In the Livecode 5.5.1 version the GET and Put URL D'ont work!!! IF you reinstall The Older version 5.5.0 They works fine...Can you fix it??

Best regards,

Lestroso :D

Klaus
Posts: 14213
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Put ang Get Url Blocking Dev Problems On Livecode 5.5.1

Post by Klaus » Fri Aug 10, 2012 2:24 pm

Buongiorno Lestroso,

no problems with GET and PUT in LiveCode 5.5.1 here on the desktop OS X!?


Best

Klaus

Fasasoftware
Posts: 203
Joined: Mon Oct 31, 2011 9:36 pm
Contact:

Re: Put ang Get Url Blocking Dev Problems On Livecode 5.5.1

Post by Fasasoftware » Fri Aug 10, 2012 2:43 pm

I'm sorry ..... i must be more precise.... ok

These commands don't works if you put them into "on opencard", "on openstack" in the main stack or in the other card of the same stack....either on MAC OSX or WINDows Livecode 5.5.1

If you put these commands "Put Url" or "Get Url" in a button.on LIvecode5.5.1... they works fine.......ok...now it's clear...

Best regards,

Lestroso :D

Klaus
Posts: 14213
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Put ang Get Url Blocking Dev Problems On Livecode 5.5.1

Post by Klaus » Fri Aug 10, 2012 3:03 pm

Ah, OK, sorry, didn't know this, I always use something like this:

Code: Select all

on opencard/openstack ## etc...
   send "httpstuff" to me in 1
   ...
end openXXX

command httpstuff
  ## do your PUT and GET here
end httpstuff
So I keep it separated from the actual OPENXXX command and can be sure
that it will get executed AFTER the OPENXXX handler, which obvioulsy is
the troublemaker, have finished!


Best

Klaus

Fasasoftware
Posts: 203
Joined: Mon Oct 31, 2011 9:36 pm
Contact:

Re: Put ang Get Url Blocking Dev Problems On Livecode 5.5.1

Post by Fasasoftware » Fri Aug 10, 2012 4:03 pm

Thank You A Lot Klaus!!!

I have Followed The Steps That You Told And Voilà...It Works...Ok!! You're a good Programmer....

Here My piece of code to Test The internet Connection:

Code: Select all

on openstack
   
 send "internettest" to me in 1 sec
end openstack

on internettest
   put " " into fld "test" of stack "test" 
put url "http://www.google.com" into fld "test" of stack "test" 
  IF  FIELD "test"  of stack "test"  is empty THEN 
    beep 3
    answer "Please Connect To Internet In Order To Work With This App!!!"
  end if
   end internettest




But in truth i think there's a problem in anyway....because not so far i was making an app and i put some code like this:

Code: Select all

GLOBAL GCANCELLOOP

on opencard
  set the loc of this stack to the screenLoc
  put " " into fld "internettest"
  put url "http://www.google.com" into fld "internettest"
  IF  FIELD "internettest"  is empty THEN 
    play audioclip "horn.wav"
    answer "Please Connect To Internet In Order To Verify The Emails Created!!!"
  end if
 Put"" into field"filtro2"
 put"" into field"campoemail"
  put"" into field"camporisultato"
  put"" into field"trovamail"
  put"" into field"mailext"
  put"@hotmail.com" into field"mailext"
put "FALSE" INTO GCANCELLOOP
end opencard

And in the revstudio2.9 works fine.....any idea??? but i think there's probably a bug in 5.5.1...

Thanks a lot...Lestroso :oops:

Klaus
Posts: 14213
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Put ang Get Url Blocking Dev Problems On Livecode 5.5.1

Post by Klaus » Fri Aug 10, 2012 4:49 pm

Di niente, amico mio :)

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Put ang Get Url Blocking Dev Problems On Livecode 5.5.1

Post by shaosean » Sat Aug 11, 2012 1:37 am

Not a bug, it is working correctly.. There is an omission in the documentation though.. If you look at the entry for load you will notice this comment
load wrote:When included in a standalone application, the Internet library is implemented as a hidden group and made available when the group receives its first openBackground message. During the first part of the application's startup process, before this message is sent, the loadcommand is not yet available. This may affect attempts to use this command in startup, preOpenStack, openStack, or preOpenCardhandlers in the main stack. Once the application has finished starting up, the library is available and the loadcommand can be used in any handler.
This piece of information is missing from the get and put, in regards to using those commands for URLs..

Klaus
Posts: 14213
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Put ang Get Url Blocking Dev Problems On Livecode 5.5.1

Post by Klaus » Sat Aug 11, 2012 11:20 am

AHA! That was it! :)

Thanks for the info!

Post Reply