Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
richmond62
- Livecode Opensource Backer

- Posts: 10080
- Joined: Fri Feb 19, 2010 10:17 am
Post
by richmond62 » Wed Nov 30, 2016 10:04 pm
Just downloaded the stack from his Dropbox and did not have any problems!?
Klaus, you may not have the "benefits" of using a 2006 polycarbonate Intel iMac running Mac OS 10.7.5 . . .
Tomorrow I shall try downloading onto my 2005 polycarbonate PPC iMac running Mac OS 10.5.8
(working on my usual basis that
backwards is the new forwards).
And, on a more serious note, I shall have a go on a machine at work running Ubuntu 14.04.
-
ClipArtGuy
- Posts: 253
- Joined: Wed Aug 19, 2015 4:29 pm
Post
by ClipArtGuy » Thu Dec 01, 2016 9:37 pm
Richmond,
did you ever get this stack working? it seems to be working here on both Windows and Ubuntu. The only thing I can think of is that maybe the extra "." in the filename might be giving you some trouble. If you are still unable to open this stack, PM me and I will e-mail you the stack.
-
ClipArtGuy
- Posts: 253
- Joined: Wed Aug 19, 2015 4:29 pm
Post
by ClipArtGuy » Thu Aug 30, 2018 5:18 pm
I finally got around to uploading this to the sample stacks under "OpenClipArt Downloader" for anyone interested.
EDIT: The initial upload had a couple superfluous substacks from a different project that this one evolved into. Revision 3 has them removed.
-
[-hh]
- VIP Livecode Opensource Backer

- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
Post
by [-hh] » Wed Sep 12, 2018 7:51 pm
Used intensively here, for testing some SVG things, your wonderful stack (OpenClipArt Downloader revision 4 from "Sample Stacks").
Works perfectly, no problem. And saves a lot of time.
Thanks a lot!
shiftLock happens
-
bogs
- Posts: 5480
- Joined: Sat Feb 25, 2017 10:45 pm
Post
by bogs » Wed Sep 12, 2018 8:11 pm
Seconded, real nice job there ClipArtGuy

-
ClipArtGuy
- Posts: 253
- Joined: Wed Aug 19, 2015 4:29 pm
Post
by ClipArtGuy » Wed Sep 12, 2018 10:33 pm
Thanks HH and Bogs!
I've had one small problem in the latest versions, since switching from Bob Hall's FastJSON library to LiveCode's JSONimport(), the function will fail sporadically with this error:
I can't find any repeatable recipe to get this error, it just happens randomly. It fails while all the controls are disabled, and they remain so afterwards, so I've added this quick escape into the card script.
Code: Select all
on escapekey
enable grp "everything"
end escapekey
I'm not sure what is causing this error, because it will work again immediately after failing....
-
bogs
- Posts: 5480
- Joined: Sat Feb 25, 2017 10:45 pm
Post
by bogs » Wed Sep 12, 2018 11:05 pm
ClipArtGuy wrote: ↑Wed Sep 12, 2018 10:33 pm
... the function will fail sporadically ... it just happens randomly
I'm not sure what is causing this error, because it will work again immediately after failing....
I had to laugh, that sounds so much like me programming. Hm, I failed, I can't tell why I failed, but if I keep typing immediately thereafter, it might work...

-
[-hh]
- VIP Livecode Opensource Backer

- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
Post
by [-hh] » Wed Sep 12, 2018 11:08 pm
You could try(!) to wrap the critical part in a try ... end try.
So you could catch the error and don't need an "escape".
shiftLock happens
-
ClipArtGuy
- Posts: 253
- Joined: Wed Aug 19, 2015 4:29 pm
Post
by ClipArtGuy » Wed Sep 12, 2018 11:26 pm
The weird thing is that this error completely disappears when I revert back to using FastJSONs "arrayFromJSON" function, which in theory is doing the same exact thing as LiveCode's built in "JSONimport" function....
-
[-hh]
- VIP Livecode Opensource Backer

- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
Post
by [-hh] » Wed Sep 12, 2018 11:50 pm
You could report this as bug?!
I think there is possibly one in that the input data is truncated when the server isn't fast enough.
shiftLock happens
-
ClipArtGuy
- Posts: 253
- Joined: Wed Aug 19, 2015 4:29 pm
Post
by ClipArtGuy » Thu Sep 13, 2018 12:03 am
I would If I could nail down a reliable recipe, sometimes I can use this stack all day without issue, then it will randomly happen... I'm not really sure what to include in a bug report right now, but I do think you may be onto something with the truncated data/slow server hypothesis.....
-
[-hh]
- VIP Livecode Opensource Backer

- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
Post
by [-hh] » Thu Sep 13, 2018 12:31 am
You have a screenshot with the offending line of the LCB source. That's worth a lot!
shiftLock happens
-
ClipArtGuy
- Posts: 253
- Joined: Wed Aug 19, 2015 4:29 pm
Post
by ClipArtGuy » Thu Sep 13, 2018 5:09 pm
[-hh] wrote: ↑Thu Sep 13, 2018 12:31 am
You have a screenshot with the offending line of the LCB source. That's worth a lot!
Hey HH,
I'm just now wondering if the actual bug is not in JSONimport, but in the "put URL" command just before it? If it IS slow server/truncated data, it may be that the put URL command doesn't wait to be fully loaded before moving along, and might explain the "unexpected end of input error? Although it doesn't really explain why FastJSON seems to work without error in the same script... I'll gladly file a bug report, I just want to make sure I have enough relevant info before doing so.
-
bogs
- Posts: 5480
- Joined: Sat Feb 25, 2017 10:45 pm
Post
by bogs » Thu Sep 13, 2018 6:00 pm
ClipArtGuy wrote: ↑Thu Sep 13, 2018 5:09 pm
If it IS slow server/truncated data, it may be that the put URL command doesn't wait to be fully loaded before moving along, and might explain the "unexpected end of input error?
Well, there is an easy way to see if that is it, dl the file completely and then put it through JSONImport. Of course, you'd have to run it a lot considering your experience of random happenings.