Monday, 22 February 2016

Problems with wiki

I have been using my current web hosting for some years now very happily for personal use and php testing.

Also for quite some time the DroidScript wiki has been hosted on their server.

This has appeared to work reasonably well except that a few users in Eastern Europe and Asia complained of difficulty in accessing the wiki.

I have been advising those users to access the wiki via a proxy.

Then I got a report that one user in North America (specifically Mexico) was also getting problems accessing the wiki directly and could also not access it via the proxy.

When I attempted to access the wiki via the proxy, I found that I am no longer able to reach it that way either.

So I raised a support ticket and, as expected, received a prompt reply.

It read:
Our servers to not permit connection from/via proxy servers. Also, for security reasons many 'high risk' IP ranges are blocked by default.
As usual, they were as helpful as they could be, they went on to say
We may be able to unblock the odd IP from the high risk range, if you can assure us that the IP is static and in use by a trusted user/business.
But unfortunately, I am unable to give such assurances.

So it seems my host no longer fits my needs.

Don't get me wrong, I completely understand that a service offering shared hosting wants to make sure that security is as tight as possible.

I shall probably be begging the developers of DroidScript to host the wiki before long as the only real-world alternatives that are cheap enough and offer whole-world access include advertisements.




Sunday, 27 September 2015

Why I am not buying a new PC

I really, really need a replacement laptop.

But times are hard and I have to consider every purchase carefully.

I think the laptop I have got will be OK for my new Espruino but I can't get it to load Eclipse with the DroidScript plugin SDK which I am desperate to learn to use.

I was going to get a second-hand one from work, then work went bust.

Every few days, I persuade myself that I will buy a new laptop - after all, they cost nothing these days.

But just as I make the decision, someone writes in the user group "someone should write a plugin for that".

Sunday, 28 December 2014

Introducing myself (at last)

I've been ignoring this blog for a while as I've concentrated on the discussion groups, some beta testing and the wiki.

However, it occurs to me that there is some significant misunderstanding among some members of the discussion group about who I am and more importantly, who I am not.

  • I am not a member of the team that develops DroidScript
  • I am not a person with any influence over how DroidScript will be developed in the future
  • I am not an experienced user of JavaScript
  • I am not a DroidScript consultant (paid or otherwise)
The above facts may come as a disappointment to several people who send me private emails on a frequent basis.

Monday, 1 September 2014

HTTP POST and the Web IDE

I've been playing with http post whilst travelling around a bit. Just getting the feel so I can use it in a project I have coming up.

It occurred to me that there was a way I could be even more lazy than currently.

So I set about writing a little app that will enable me to bookmark the server for the Web IDE, even though the ip address changes occasionally.

I just open the app, hit Ok, wait a couple of second for the button to rename itself to Exit, then hit it again.

The bookmark on my PC then opens a page with a link to the server on my tablet.

Give it a day or two and I'll probably cut out the link and go for a redirect instead. The only problem with that is it makes the initial bookmarking a bit tricky.

The code I use is reproduced below. It points to a different url than I use, so you are welcome to try it.

In the highly unlikely event that 2 people try to use it at the same time, you may not get the right link.

Wednesday, 20 August 2014

Getting user input

I frequently need to ask for user input when it is not convenient to have a TextEdit on the screen permanently.

Of course it's possible to organize this on a case by case basis but it is frequently needed at the early stages of code testing, so I could do with a nice simple way to put a quick and dirty solution up, even if I later replace it later with more considered design.

What I've ended up doing is creating a reasonable facsimile of a dialog, which can be called by placing a file ask.js into the Misc folder beside the main code.

I then load that using:
  app.LoadScript("Misc/ask.js");



The question is asked using the format:
  ask("Enter your first name","Steve")
Where the second parameter is an optional default value.
If the default is to be cleared between uses of the dialog, I set it to ""

The answer is return in something similar to an OnTouch handler
function askAnswer( ans ){
  alert( ans )
}
I have a simple demo spk called mydialog
The file Misc/ask.js looks like this:

Thursday, 14 August 2014

Simple clock app

I had need of a simple clock app to show the time and speak it to me every 5 minutes.

It took very little time to pull that together but getting it to be configurable by other people on various different devices was a nightmare.

The answers I came up with in the end were much simpler than anything else I tried.

If anyone wants to take a look at it, there is an spk at http://hudl.sgarman.net/public/spk/SJGclock001.spk

The code looks like

Thursday, 7 August 2014

Make a copy of a project

One facility I can't find in AndroidScript is the ability to create a working copy (under another name) of an androidscript app.

As I have a need for freezing versions of a tiny app (my file explorer) I wrote an AndroidScript app to do this for me.

It currently has the specific app detail hard-coded but it would be really simple to extend it to work with any app that is made up of only text files.

An spk of the app is at http://hudl.sgarman.net/public/spk/version.spk

The code looks like: