Tuesday, July 28, 2009

Chrome Gmail Notifier extension hack for your domain

My email domain is hosted by Google, so when they released an extension for Chrome for Gmail I was disappointed that it only supported @gmail.com addresses.

But here's a simple way to fix it:

  1. Install the Gmail Notifier in Chrome

  2. Close Chrome.

  3. Find your extension's installation. On my Windows machine it's here:

    C:\Documents and Settings\tmckernan\Local Settings\Application Data\Google\Chrome\User Data\Default\Extensions\ilpnegfhimflflifcnmgpeihglhedbnn\0.1

    So you may have to find the proper extension folder on yours.

  4. Look for these lines near the top:

    var gmail = "http://mail.google.com";
    var gmailAtomRef = "https://gmail.google.com/gmail/feed/atom";

  5. Replace them with this;

    var gmail = "https://mail.google.com/a/<your domain here>/";
    var gmailAtomRef = "https://mail.google.com/a/<your domain here>/feed/atom";

  6. Save the file, start up Chrome, and try clicking on the Login button along your status bar. If all is well it should take you to your Gmail login for your domain, and then the Notifier will then switch from saying "Login" to "Inbox".

Flex debugger hanging your browser

I've been running into a situation where nearly every time I try to debug my app, the browser hangs on the Flash "loading" screen.

With Flex Builder you can stop the debugger and it kills fdb, un-freezing the browser, and then you can use your app and browser again, but without the debugger.

With IntelliJ pressing "stop" doesn't seem to kill fdb, so then I have to go into Task Manager and kill fdb myself.

Based on the bug reports on Adobe's site the problem occurs when your app tries to make a connection back to your local server (127.0.0.1), and somehow that stops it from also connecting to fdb. They say it's been fixed but not released to the public, so if this is hurting your productivity you might want to go watch it on their Jira so you will know when they release it:

http://bugs.adobe.com/jira/browse/FB-16153

They promise to post to the bug report when they make the release public.

The only workaround I know of is to use Flash Player 9 instead of 10. For me 9's debugging works fine every time and my project doesn't require 10, so I'm good to go. For my co-workers that require 10 though...

Thursday, July 23, 2009

The Google Chrome Browser gmail, mouse gesture and twitter (chritter) extensions

I've been trying Google's Chrome Browser pretty much since it first came out. The user experience is slick - it's fast and putting tabs in the top window bar frees up much needed real estate. But there are features keeping me from using it daily.

Nowadays I'm debugging flex apps in Firefox and I want a separate browser for my normal usage, and it turns out Chrome's developer release now supports extensions after all! The selection is very limited but still make a huge difference.
  • Mouse gestures: this is my only must have extension.
  • Gmail notifier: I like having a small, unobtrusive notifier in the browser bar rather than as, say, a separate icon in my Windows task bar.
  • Twitter: yeah, I'm one of those people. This extension is in its early stages though - it cycles through tweets but doesn't allow you to see them all at once, or reply. It's probably not a great substitute for your own favorite twitter app. But one thing it has over some others is it uses the new oauth mechanism rather than logging you in. So it doesn't need to send your login info over the wire, in the clear, like firestatus and (I think) TwitterFox do.
So here's how you get yourself some Google Chrome Goodness in a few easy steps.
  1. Get the dev channel of Chrome: download and install the installer for the Dev channel at http://www.google.com/chrome/eula.html?extra=devchannel. That did it for me but if you want more info go here http://dev.chromium.org/getting-involved/dev-channel.
  2. In your shortcut for Chrome add the following "--enable-extensions" and restart Chrome. So if you're in Windows Land like me your shortcut looks like this: "C:\Documents and Settings\tmckernan\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" --enable-extensions
  3. Click on each link for each extension you want.
  4. Mouse gestures:
    http://chromegestures.googlecode.com/files/ChromeGestures.crx
    OR for more info: http://code.google.com/p/chromegestures/
  5. Gmail Notifier:
    http://dev.chromium.org/developers/design-documents/extensions/samples/gmail.crx?attredirects=0
    OR for more info: http://dev.chromium.org/developers/design-documents/extensions/samples
  6. Twitter (chritter):
    http://groups.google.com/group/chromium-extensions/attach/13398294b26b48be/chritter.crx?part=4
    OR for more info: http://groups.google.com/group/chromium-extensions/browse_thread/thread/75a02aa146fcfabd
  7. Restart Chrome and enjoy the Goodness!

Wednesday, July 22, 2009

Choosing a browser when debugging flex apps in IntelliJ

IntelliJ calls fdb, the Flex debugger, which in turn uses the OS's "http" file association. This is not always the same as your OS's default browser.
In Windows my "http" file association was IE - even though my default browser was Chrome. You can see what your setup is by running this at the command prompt:
cmd /c ftype http
And if you want to change it, then run this (substitute the path to your browser of choice):
cmd /c ftype http="C:\Program Files (x86)\Mozilla Firefox\firefox.exe" %1
Mine was using I changed the "http" file association to Firefox and now IntelliJ debugs in Firefox like I originally wanted. And now when I type cmd /c ftype http I get the following:
http="C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -requestPending -osint -url "%1"

Friday, July 10, 2009

Entirely useful IntelliJ tip for the day:

A single key-combo will make this:
Name name = someDao.
getMyObject(anotherObject).getName();
like this:
AnObject myObject = someDao.
getMyObject(anotherObject);
Name name = myObject.getName();

It's cool, it's Ctrl-Alt-v and it'll make debugging a NullPointerException a lot easier when you actually know which object is null. Unlike the first line where you don't know if the someDao or the AnObject is null.

Solving Error #2007: Parameter blendMode must be non-null.

Different versions of Flex's v3 SDK are not compatible with each other. You cannot always use a swc compiled against 3.3 in your 3.2 project. This is a useful warning if you're using multiple swc's from other projects.
The unobvious Flex error you get when mixing SDK versions is:
TypeError: Error #2007: Parameter blendMode must be non-null.
I didn't see this problem until my component tried creating a drop-down list, at which point it tried validating the list and spat this out.
I can only find this one reference to this problem, hence this post seems like it might help somebody:
Agile UI: I hate error messages like this