This topic contains 6 replies, has 1 voice, and was last updated by Ian Lawrence 3 years, 3 months ago.
7. April 2015 at 11:29 #1126
I have an error with a certain class of processingjs sketches on procoding, in both iOS and OS X.
‘Processing.js: unable to execute pjs sketch: ReferenceError: can’t find variable: tinylog’
The same sketches work fine in the processing ide, or if embedded in web pages. I suspect that there is something in procoding?
Ian7. April 2015 at 12:34 #1127
that’s hard to answer without further information. What do you mean with “a certain class of processingjs sketches”?
Does it happen with all processing.js sketches or just with some of them?
tinylog is the console that shows up with logs and it’s built into processing.js.
Did you maybe change the processing.js version by having a newer processing.js in your documents folder?
I just checked just to be absolutely certain, and for me it works with the provided examples and the bundled processing.js version.
Michael7. April 2015 at 12:46 #1129
Oh: it just occurred to me in the other thread: do these sketches maybe have many (or some big) resources?
Does this message disappear when you reload the affected sketch a couple of times?
If yes, you should reduce the amount of resources you are using.7. April 2015 at 13:43 #1130
It is a big resource, but all of it is loaded every time. Only certain functions / objects of this resource are called in any sketches*, although its all loaded every time. For one kind of resource ( a particular drawn chunk) I always get the error on procoding, on iOS or OS X. I don’t get the error in the processing IDE. Reloading (refreshing) does not make it go away.
I was not aware that tinylog was a part of processingjs, so apologies for any aspersions cast…
The sketch does work on the wild web, where the same resources are loaded from a remote server, as is the sketch: like this: http://supportingphysicsteaching.net/zztestphase/En_BicycleFreewheelShiftedSupport.html
I have not updated processingjs in months, although I know that there is a new one out there..
Maybe not urgent, but I much prefer to develop in Procoding, rather than the slew of IDE/Browser/text processor
* there is a good reason for this…8. April 2015 at 11:26 #1131
Thanks again for reporting this.
Michael8. April 2015 at 11:34 #1132
as a workaround:
can you test adding this line somewhere at the top of your sketch and see if it works:
window.tinylog = Processing.logger;
A fix will also be included with the upcoming updates!8. April 2015 at 13:06 #1133
I’ve been off in the wilds of python for a bit. Back to pleasure now…
Dropping this in as a first line does indeed allow the sketch to run as expected in procoding OSX (not checked in iOS yet…)
The topic ‘tinylog’ is closed to new replies.