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, 27 September 2015
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.
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.
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:
The file Misc/ask.js looks like this:
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 mydialogThe 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
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:
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:
Tuesday, 5 August 2014
File explorer v002
I did a bit more work on the file explorer.
You might think I made it worse.
The new layout makes it easier to tell which files are folders.
The new spk is at http://hudl.sgarman.net/public/spk/SJGexplorer_002.spk
The code looks like this:
You might think I made it worse.
The new layout makes it easier to tell which files are folders.
The new spk is at http://hudl.sgarman.net/public/spk/SJGexplorer_002.spk
The code looks like this:
Subscribe to:
Posts (Atom)