Hello everybody. I added some functionality to my cocoa-completion command. It will now show context based completion suggestions when the type of the reciever can be deduced. If it can not find a method based on class, then it will revert back to the old behaviour giving you all possible candidates. The command currently only gives context sensitive information for AppKit and Foundation.
Here are the two cases that give context-sensitive suggestions: (^ is the caret) hit alt-Esc as usual.
[NSString someClassMethod^] [[object pathWithComponents:myArray] instanceAndClassMethodsThatWorksOnAString^]
Due to a bug (that crashes TextMate) that I have not managed to track down I have restricted the functionality, so that one always have to type atleast one char before completions are available.
The command uses methods from rubycocoa (http://rubycocoa.sourceforge.net/), so be certain to have that installed and that it can be reached from the standard ruby interpreter (or change the she-bang line in the command).
If you like this version of the completion command, then please tell me and I will switch the one in svn to this.
Joachim Mårtensson