Archive for September, 2005

From Vim to Eclipse

I used to do almost all my coding (and editing in general) in vim. I actually think vim is one of the most brilliant pieces of software ever created — obviously not because it’s particularly feature rich, but because it is simple and elegant. I can use vim for editing almost any type of document, on any platform, and it can be used remotely through ssh just as easily as it can be used locally.

But I’ve actually been using Eclipse more and more lately in an attempt to modernize. I find the editor itself slower to use (not because of performance, but because vim was designed from the start to make navigation and editing as fast as possible), but in general, all of the features of Eclipse have actually made me more productive. In an attempt to get the best of both worlds, however, I’m now experimenting with a Vi plugin for Eclipse. It seems to work pretty well, though not exactly as I would expect in all circumstances, so I’m debating whether to stick with it, or just give up and surrender myself entirely to Eclipse. Whenever possible, I always try to stick with as much of the default functionality of an application as possible so that I can move from one machine to another and feel like I’m in the same environment. Ironically, that’s precisely one of the things I like best about vim, and might be what prevents me from trying to integrate it into Eclipse.

Are You Using the Flash / JavaScript Integration Kit?

If you have a publicly accessible example, please post it here, send me an email, or if you’re on the Integration Kit mailing list, post it there. I’d love to see all the creative applications people have come up with. Thanks!

Replacing Trackbacks with Google References

You may have discovered by now that Google recently released their new Blog Search beta. So far, as always, I’ve been impressed. I’m experimenting with replacing the concept of trackbacks on my blog with Google References (see the "References" link in the post footer). This should use Google Blog Search to find all the blogs that link to specific posts of mine. Maybe a few people will link to this post as a good test case. I wonder how long it will take Google to index the references.

If you’re interested in doing the same thing, just check out how the link URL is constructed, and it should be pretty clear. If you’re using Movable Type, here’s the code:

<a href="<$MTEntryPermalink archive_type="Individual"$>">References</a>

Changes to the Flash / JavaScript Integration Kit

Over the last couple of days, we’ve made several changes to the Flash / JavaScript Integration Kit. If you are using the Integration Kit, or if you’re interested in using it, I strongly recommend grabbing the latest code out of Subversion.

Here is a list of the changes we’ve been working on:

  1. The Integration Kit now uses FSCommand to go from Flash to JavaScript on Internet Explorer on Windows. Using getURL causes several issues on IE, and we found that FSCommand works much better in that environment. You will no longer get that odd clicking sound that IE likes to make when you click on a link, and the kit will no longer cause open sockets (images in the process of loading, XMLHttpRequest sockets, etc) to be prematurely closed.
  2. We added the ability to handle multiple consecutive calls from JavaScript to Flash. Before, if you tried to make multiple consecutive calls, typically just the last one would succeed. Now, not only can you make as many calls as you want, but all the calls are guaranteed to happen in the correct order. (Basically we added a queuing mechanism to the JavaScript.)
  3. We added an optional scope argument to the FlashProxy. This allows you to specify the JavaScript scope (object instance) that you want to call functions on from Flash. This argument is entirely optional, and leaving it out will result in the kit working just as it did before (calling functions within the document scope).
  4. We fixed a bug that was breaking function calls from Flash to JavaScript when passing strings with single quotes in them.
  5. We added support for Opera 8.0 and higher (at least that’s what we tested on — it might work with earlier versions) on both Mac and Windows.

There is one additional issue with respect to getURL and FSCommand I need to explain. If your Flash content is compiled for Flash Player 7 or higher, the Integration Kit will automatically use FSCommand where appropriate and getURL everywhere else. This is definitely the recommend usage. If your content is compiled for Flash Player 6, getURL will be used universally. That doesn’t mean it won’t work in IE on Windows, but it doesn’t work nearly as smoothly as FSCommand. The bottom line is that if you can compile for Flash Player 7 (which now has more than 90% penetration), you should do so.

We have not done another official release of the Integration Kit with all these changes yet. Right now, the official release is pretty old code with lots of issues, so we definitely recommend using the newest code from Subversion. We hope to do another official release of both the code and documentation very soon (maybe next week).

Let me know if you discover any issues so we can get them fixed before the next official release.