Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Fri Dec 15, 2017 10:20 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: HTTPSocket and Get Image From URL
PostPosted: Wed May 29, 2013 11:20 am 
Offline

Joined: Thu Jun 29, 2006 5:55 am
Posts: 54
Hi. I have had this code working perfectly in my application which was compiled using REALbasic 2008R1 but now it's in Real Studio 2012 R2.1 it doesn't work the result is always FALSE:

Dim f as FolderItem
Dim result As Boolean

If SpecialFolder.Temporary <> Nil then

f = SpecialFolder.Temporary.child("TempImage")

result = Get(url, f, 3)

End If

If result then
showPicture f
Else
drawTempPic
End If


The LastErrorCode is always 102. The url is visible via browser and in the old compiled application. I have even tried using a different domain url and same problem.

The file is initially written in the Temp folder but remains as zero bytes. When debugging it is readable and writable and not locked.

FYI: it is calling the Get() command but always returning false.

Any help would be greatly appreciated.

Thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: HTTPSocket and Get Image From URL - RESOLVED
PostPosted: Thu May 30, 2013 9:04 am 
Offline

Joined: Thu Jun 29, 2006 5:55 am
Posts: 54
Solved! Finally...

This issue had something to do with the HTTP Socket control (that inherited a custom class socket) which was located on the main window being called from a modal window.

For whatever reason, calling the socket from another window (not sure if it being modal was the reason) stopped it working correctly so the solution was to create a new control instance of the socket on the modal window and execute the socket tasks from there.

Hope this helps anyone else who may encounter a similar problem in the future!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group