Page 2 of 3

Re: SVG and PNG Clip Art Stack

Posted: Wed Nov 30, 2016 10:04 pm
by richmond62
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.

Re: SVG and PNG Clip Art Stack

Posted: Thu Dec 01, 2016 9:37 pm
by ClipArtGuy
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.

Re: SVG and PNG Clip Art Stack

Posted: Thu Aug 30, 2018 5:18 pm
by ClipArtGuy
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.

Re: SVG and PNG Clip Art Stack

Posted: Wed Sep 12, 2018 7:51 pm
by [-hh]
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!

Re: SVG and PNG Clip Art Stack

Posted: Wed Sep 12, 2018 8:11 pm
by bogs
Seconded, real nice job there ClipArtGuy Image

Re: SVG and PNG Clip Art Stack

Posted: Wed Sep 12, 2018 10:33 pm
by ClipArtGuy
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:
Screenshot from 2018-09-12 17-06-03.png
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....

Re: SVG and PNG Clip Art Stack

Posted: Wed Sep 12, 2018 11:05 pm
by bogs
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... Image

Re: SVG and PNG Clip Art Stack

Posted: Wed Sep 12, 2018 11:08 pm
by [-hh]
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".

Re: SVG and PNG Clip Art Stack

Posted: Wed Sep 12, 2018 11:26 pm
by ClipArtGuy
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....

Re: SVG and PNG Clip Art Stack

Posted: Wed Sep 12, 2018 11:50 pm
by [-hh]
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.

Re: SVG and PNG Clip Art Stack

Posted: Thu Sep 13, 2018 12:03 am
by ClipArtGuy
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.....

Re: SVG and PNG Clip Art Stack

Posted: Thu Sep 13, 2018 12:31 am
by [-hh]
You have a screenshot with the offending line of the LCB source. That's worth a lot!

Re: SVG and PNG Clip Art Stack

Posted: Thu Sep 13, 2018 12:41 am
by ClipArtGuy
It seems like it may be related to one of these confirmed bugs?

https://quality.livecode.com/buglist.cg ... JSONimport

Re: SVG and PNG Clip Art Stack

Posted: Thu Sep 13, 2018 5:09 pm
by ClipArtGuy
[-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.

Re: SVG and PNG Clip Art Stack

Posted: Thu Sep 13, 2018 6:00 pm
by bogs
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.