R-Forge: File ‘/pkg/DESCRIPTION’ is out of date

I came across a puzzling “File ‘/pkg/DESCRIPTION’ is out of date” error when updating an R-package of mine on R-Forge today. I was pretty sure the version number and date were correct. I couldn’t figure out any other issue, so I made a copy of my documents, checked out the code again, and copied the modified files back. All worked. I’m still a bit puzzled as I only use one machine for this, but who cares if the code is working…

pandoc-citeproc: “stdin” (line 31, column 2): unexpected “b”

Today I came across the following error in pandox (pandoc-citeproc) that was a bit cryptic to me:

pandoc-citeproc: "stdin" (line 31, column 2): unexpected "b"
expecting "c", "C", "p", "P", "s" or "S"
[...]

When I also got this on an empty text (markdown) file with just a reference in it, I realized that the markdown document was not the problem. Indeed, I had inadvertedly deleted a trailing comma in the bibtex document.

@article{lee
title = {Racial [...]

doesn’t work; it should be:

@article{lee,
title = {Racial [...]

Livecode: write document on Android

Android does not allow apps to write just anywhere as a matter of safety. That’s probably generally a useful feature, but this time I wanted to save data to a text file that is accessible to the user (me). The official guide wasn’t really helpful in this case, because there are ways to save data on Android that are not accessible by the users — e.g. for settings.

Apparently the ‘easiest’ way is to save like this:

set the defaultFolder to specialFolderPath("external documents")
put field "write" into URL ("file:test.txt")

The other (common) special folders (“documents”, “desktop”, “engine”) don’t seem to work on Android.

OK, but where is this file we created? Here:
Local/internal storage/Android/data/com.yourcompany.yourapp/files/test.txt

Not the most intuitive place to me, but whatever, I can access this file from the Android device.

Livecode: resolving “could not compile service support class”

I’m not going to tell you how long I’ve spent figuring out why LiveCode wouldn’t compile to Adroid, throwing “could not compile service support class” errors. Apparently this is one of the more common errors when compiling to Android, but typically this indicates a problem with the “mobile setup” (Android Studio, Java).

This was different. I had LiveCode (9.0.3) setup on a Windows machine, Android Studio installed and properly setup. The “mobile” preferences looked OK (path to Android SDK and Java were present and correct), and most crucially, using this setup I had compiled stacks successfully. Now I had a very simply stack and suddenly I got this error. Shockingly, the stack that had compiled an hour earlier wouldn’t compile anymore. I tried many things, and sometimes the stack that was ‘good’ before would still compile, but sometimes it wouldn’t.

It turns out that although LiveCode generally is not case sensitive, it actually can be. I had this one line in my code (this code actually doesn’t work on Android, but I wanted to test whether it works):

set the defaultFolder to specialFolderPath("Documents")

it should have been:

set the defaultFolder to specialFolderPath("documents")

Yes, really, that was all. So in this instance, LiveCode was case sensitive, and quite atypically it didn’t detect the error during coding (LiveCode’s errors when compiling for mobile can be quite cryptic/useless).

Now, I also found that once I got this error, LiveCode would fail to compile anything (yes, even an empty stack) — until I restart the program. So I learned two things here: first, LiveCode can be case sensitive, second, when LiveCode throws this error, I need to re-start the program before trying to compile again.