Dropbox Livecode Library
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Dropbox Livecode Library
yes, URL's can be case-sensitive, once the domain section is resolved, because everything else is passed as an argument to the host.
Re: Dropbox Livecode Library
I recently upgraded to LC 8.
I had a few problems with the "phx_DropboxAvailable" and then they disappeared (uh?)
The fact is that on LC 8 the "put tURL" return a var but also also a "the return" (see LC dictionary on "https")
Should the "phx_DropboxAvailable" function somehow upgraded? and how?
When I had problems, it was like if there was a "put tURL" running (but there was none). (The function was called from the "openStack" with the "send in 200 milliseconds".
Trevix
I had a few problems with the "phx_DropboxAvailable" and then they disappeared (uh?)
The fact is that on LC 8 the "put tURL" return a var but also also a "the return" (see LC dictionary on "https")
Should the "phx_DropboxAvailable" function somehow upgraded? and how?
When I had problems, it was like if there was a "put tURL" running (but there was none). (The function was called from the "openStack" with the "send in 200 milliseconds".
Trevix
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
Re: Dropbox Livecode Library
What version of the library are you using? The problem wasn't with 8, the problem was that dropbox changed the way that it responded to bad URL's (which is how the library could tell if it was connected or not. There is no "ping" in the dropbox API, so this was really the only way to do it). The current version of the library is 1.12.
Re: Dropbox Livecode Library
Yes, I'm using 1.12
When I had the problem, the result was set to ""Error Previous request not completed".
I don't know why the problem went away.
When I had the problem, the result was set to ""Error Previous request not completed".
I don't know why the problem went away.
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
-
- VIP Livecode Opensource Backer
- Posts: 7252
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Dropbox Livecode Library
The "Previous request not completed" error is from libURL, the library that controls internet requests and is part of LC. It has always been an issue with no good workaround. Once it happens it will sometimes time out and go away but other times you need to reset the connection completely.
LC 8.1rc2 uses a new networking external and has done some work on this particular error. You might want to try that version of LC to see if it helps.
LC 8.1rc2 uses a new networking external and has done some work on this particular error. You might want to try that version of LC to see if it helps.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 9847
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Dropbox Livecode Library
I'm working on it. Thanks to Charles' post I'm now able to submit any number of requests with a more accurate error reporting that doesn't hang libURL:jacque wrote:The "Previous request not completed" error is from libURL, the library that controls internet requests and is part of LC. It has always been an issue with no good workaround.
http://lists.runrev.com/pipermail/use-l ... 30386.html
The remaining problem is that all error-handling must be done without "exit to top", which usually means tedious replication of error handling in each script that calls libURL, carefully structuring the logic to allow a with-the-grain exit that doesn't rely on "exit to top".
I'm in the process of crafting a hopefully simple recipe stack for that now, and will submit it to the bug queue. If it's determined not be a bug per se we'll at least get tips on a useful workaround. And if it is a bug hopefully it can be addressed in the 8.2 scope.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 7252
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Dropbox Livecode Library
Is the error still in 8.1rc2? I worked with Charles on that too. My use case is different from yours though, I don't use an exit statement.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 9847
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Dropbox Livecode Library
How do you centralize error handling without "exit to top"?jacque wrote:I don't use an exit statement.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 7252
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Dropbox Livecode Library
I'm funneling all URL requests through a single handler which contains this:
The function it calls:
Charles found a bug in the original libURL that sometimes didn't deal properly with "hung" connections. He's fixed it, or at least most instances of it, in TSNet. The error goes back to the earliest days of libURL. Did you try Dave's suggestion of setting the headers? That sounded promising to me:
Code: Select all
set the socketTimeoutInterval to 5000 -- adjust to taste
repeat 3 times -- Chipp's method for unreliable connections, he used 5 repeats
get url tURL
put the result into tNetworkErr
put it into tData
if not needToRetry(tNetworkErr) then exit repeat
wait 100 milliseconds -- don't use w/msgs, let it block
end repeat
set the socketTimeoutInterval to 10000 -- restore default
if tNetworkErr <> "" then
-- inform user or write to log
else
-- deal with the data
end if
Code: Select all
function needToRetry pError -- Chipp's
if pError is "timeout" or pError contains "socket timeout" or pError contains "error socket closed" \
or pError contains "Previous request not completed" then
return true
else
return false
end if
end needToRetry
Code: Select all
set the httpHeaders to "Connection: close"
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 9847
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Dropbox Livecode Library
Thanks. One of the things I've loved about "exit to top" in xTalks all these years is that I can handle even the UI parts of generic errors in one place. I've considered removing it to accommodate the conflict with libURL, but if I only return values to the caller than I need to replicate generic error handling throughout all my caller scripts.
Personally, considering how useful "exit to top" is, I'm just considering this a bug for now and will submit a report on it once I get my sample stack done.
Personally, considering how useful "exit to top" is, I'm just considering this a bug for now and will submit a report on it once I get my sample stack done.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Dropbox Livecode Library
Great library. Thanks
Using mobile and trying to upload a file that has spaces on its name, the "%20" space compare on the file name, on the DropBox web site and in the desktop folder of DropBox.
It messes up my name handling of files by LC, when downloading.
Do I have to URLdecode upon reading or there is a way to avoid this (just a mobile thing)?
Still,dragging files with space in the name to dropbox, in the traditional way, doesn't show URL coding.
Thanks
Trevix
Using mobile and trying to upload a file that has spaces on its name, the "%20" space compare on the file name, on the DropBox web site and in the desktop folder of DropBox.
It messes up my name handling of files by LC, when downloading.
Do I have to URLdecode upon reading or there is a way to avoid this (just a mobile thing)?
Still,dragging files with space in the name to dropbox, in the traditional way, doesn't show URL coding.
Thanks
Trevix
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
Re: Dropbox Livecode Library STOPPED working
Oh Boys...
A few days ago the library stopped working. I connect ok and i get User Info but when I try to list files or folders I always get a "[]" as a return from the "put URL tUrl into tAnswer" of the function phx_DropboxGetFileList.
Do DropBox has been updated and something is changed?
Somebody can check the library and help me out with this?
Thanks
Trevix
A few days ago the library stopped working. I connect ok and i get User Info but when I try to list files or folders I always get a "[]" as a return from the "put URL tUrl into tAnswer" of the function phx_DropboxGetFileList.
Do DropBox has been updated and something is changed?
Somebody can check the library and help me out with this?
Thanks
Trevix
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
Re: Dropbox Livecode Library
Check your version. Latest is 1.12, I think. I should have the latest on git.
Re: Dropbox Livecode Library
Yes. I am using v 1.12
I can create a folder or file on dropbox but the search does not work, always returning "[]".
Inside the DBox application there is folder named "templates" and inside this folder there are other folders named "_x_test1","_x_test2",etc
It has been working fine in the last two month using the script:
but suddenly the search does not work anymore, not even with different naming.
Any clue?
Thanks
I can create a folder or file on dropbox but the search does not work, always returning "[]".
Inside the DBox application there is folder named "templates" and inside this folder there are other folders named "_x_test1","_x_test2",etc
It has been working fine in the last two month using the script:
Code: Select all
on mouseUp
put empty into field "flAnswer"
put "templates/" into tPath
put "_x_" into tSearchString
put Drop_ListFiles(tPath,tSearchString) into tArray
if "Err:" is in tArray or "Nothing Found" is in tArray then
put tArray into fld "flAnswer"
exit mouseUp
end if
--show it
set the itemdelimiter to slash
put empty into tList
repeat for each line tKey in the keys of tArray
put last item of tArray[tKey]["path"] & cr after tList
end repeat
put tList into fld "flAnswer"
end mouseUp
Any clue?
Thanks
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
Re: Dropbox Livecode Library
Since DropBox API v1 is now deprecated, I wonder if I should start over using the Gerard McCarthy Library (http://livecodeshare.runrev.com/stack/794/DropboxAPI_2).
How easy will that be (get files and folders list, create files and folders).
And will I be able to grant access to users of my App, as I was doing with V1?
Any one experimenting with it?
Trevix
How easy will that be (get files and folders list, create files and folders).
And will I be able to grant access to users of my App, as I was doing with V1?
Any one experimenting with it?
Trevix
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>