Trying to setup WiFi on my Pi while it is running headless is a headache! I have personally had no success at all with any of the instructions I found on the net editing individual files etc. Then I found 'wcid' which provides a GUI like experience on the command line and over SSH. It made the whole process of setting up my wireless no more difficult then on the desktop.
If you have your Pi connected to a wired interface then just:
then run:
find your wireless and press enter then type in any details you need. Save and quit and you should connected to your wireless network! No manual editing of config files needed.
Would it be possible to include this within the Wheezy distribution as I found it made it much easier to setup wireless with it?