[TxMt] Re: [TextMate] workarounds for lack of (s)ftp/external editing support?

Allan Odgaard allan at macromates.com
Mon Oct 25 22:40:00 UTC 2004


On 25. Oct 2004, at 23:32, Jonas M Luster wrote:

>> I've also played shortly with this, I was actually awaiting six lines 
>> of code that Jonas mentioned on his blog, but it seems he's forgotten 
>> about me, so I should probably continue my own work instead...
> Hmm, I sent it to allan at macromates.com. Strange.

Yes, that's weird -- TextDrive have had a bit of downtime the last 
couple of days, but not more than at most an hour at a time AFAIK, 
maybe the SMTP just caught TextDrive at that time, and will resend!?!

But I'd be glad if you'd resend the code, probably to allan at simplit.com 
then ;)  Mainly I got stuck extracting the alias from the apple event 
and converting it to something useful -- but I'm not sure if the file 
is always an alias, or can also be an FSRef or a plain text string/URL. 
There seems to be quite a few types for files defined for apple events.

Also, I didn't look into actually sending back events to the sender, 
there seems to be no cocoa support for this, so I'd have to dig into 
Carbon documentation, which means, any sample code would be much 
appreciated, as I'd save me time (and probably frustrations, given my 
history with legacy Apple APIs ;) ).

> It's actually a bit more, if you don't have AE receivers setup, yet.

Setting up an AE receiver for odoc doesn't really help, because 
NSApplication won't pass on the event, to the best of my attempts at 
least -- but I can peek at the current apple event in one of the 
application delegate methods to open files, this seems to be the 
solution -- it's still a bit weird, cause it seems to depend a bit on 
from whom the event is sent, how NSApplication treats it (i.e. I can 
have the event received by a custom handler if I send it from Script 
Editor, although never the first event ("naturally")).

> But you're right, unless Transmit adds TextMate as an editor, it's 
> pretty much moot.

I also downloaded Interachy (sp?) and at least they allow the user to 
add other editors to the list. Probably some of the other ftp clients 
for the Mac does that as well.

Kind regards Allan




More information about the textmate mailing list