Archive | Javascript RSS feed for this section

Why has AIR file.browseForSave no FileFilter option

3 Jun

I try to create my own extension with a saved AIR file. The point in doing this is that the user knows what files are created by what program and a file without an extension is just plain ugly.

When you save a file in other programs you can choose to overwrite a file (that is created before or has a known extension) or create a new file. I tried to find a way in AIR to do this same thing. I found one article on an Adobe blog that uses a FileFilter in combination with a file.browseForSave but he is using it in a way that it has no effect and is pretty useless. He is creating a FileFilter but he is never using it:

save:function(){
var fileFilter = new air.FileFilter("To Do Lists", "*.todo");
ToDo.currentDirectory.addEventListener(air.Event.SELECT, ToDo.fileSaved.bind(ToDo) );
ToDo.currentDirectory.browseForSave("Save To-do List");
}

I hear you think “who cares about the FileFilter” because it sounds like a minor problem and maybe it is. But for me it seems easy to build because browse(), browseForOpen() and browseForOpenMultiple() are using it.

I wonder if there is a way to work around this problem. It is maybe a little detail but it are the little details that make things great.

How to put Google Maps into Ruby on Rails

18 Jan

Introduction
Last week A month ago Gerard Lolkema had a lot of trouble getting Google Maps working in Ruby on rails so he asked me for help.

Gerard Lolkema already found a tutorial to do this. The tutorial: Rails, Geocoding, and Google Maps from Andre on Tech. This tutorial provides you of a lot of code that is direct usable but because we make a dutch website we need to display addresses from The Netherlands. This functionality is not in the code (and probably not in the plugin) of Andre on Tech. He is using a web service from an other website to get the longitude and latitude from an address, but the problem is that it is only possible to send US addresses. To find that problem took us half a day.

Finally we found an alternative to put Google Maps in our website. And this is how we did it.

Put Google Maps in your webpage
First you need a Google Maps API Key

(more…)

Page 1 of 11