URL Encoding in Actionscript

Sometimes you just need to URL encode a string (URLEncodedFormat() in CF, or urlencode() in PHP), and not actually make a HTTP request. Here’s a simple library for you to use, that I wrote for my OAuth actionscript lib.

Attached is URLEncoding.as for your enjoyment.

Moving to Mac: SVN, Finale

So, after struggling with all other SVN clients, I’ve settled on a commercial product, Syncro SVN Client. It’s no TortoiseSVN, but it’s got all of the major SVN functionality, it works, and it’s stable. Combine that with the light bit of stuff that I do via Subclipse, and I’ve got all the SVN goodness I need to get along.

I’m still holding out hope for a TortiseSVN port, though.

EncryptedLocalStore general internal error

So I’m developing an AIR app, and experimenting with the EncryptedLocalStore features of AIR. I got to a point where I thought my code was solid, but I wanted to erase all the mistakes I’d created in my keychain. So, I went into Keychain Access, and deleted the keychain file that looked like it was associated with my app (wish I had the keychain file name, but it’s gone). When I restarted my app, and it went to write to the keychain, I get this error:

1
2
3
Error: general internal error
at flash.data::EncryptedLocalStore$/processErrorCode()
at flash.data::EncryptedLocalStore$/setItem()

Even more strange, it only threw this error with the app launched via Flex Builder. If I took the AIR file and installed and launched the application, there was no error.

I tried everything I could think of to start over, from recreating my project to reinstalling Flex Builder. Luckily, NoboG on the Adobe support forums pointed me in the right direction. All I had to do was delete the related files in ~/Library/Application Support/Adobe/AIR/ELS/

Now Flex Builder works again on my laptop, and I’m well pleased.

Watch your site degrade in different versions of IE

For anyone who might not know, Microsoft provides VirtualPC virtual machines for free, so you can test against multiple versions of IE on different versions of Windows (XP or Vista).

Download the virtual machines here

They VM’s are pre-activated, and expire every few months, but then they release new VM’s.

Now, you can see first-hand what a crappy browser IE is, regardless of version. 🙂

Debugging HTTP on the Mac

I was having a little trouble with the SmugMug upload API, and they needed a raw dump of the request to help debug it. I downloaded Wireshark, but it didn’t work out of the box (it doesn’t see any interfaces, which is a common issue that I’m sure is easy to fix). So I did a couple google searches, and found there’s a built-in tool called tcpdump. From the Terminal:

1
sudo tcpdump -s 0 -A -i en0 host upload.smugmug.com

That’s all I needed to do to get my raw HTTP POST dump. Just thought y’all might want to know that.