Sunday, February 1st, 2004
I did a little bit of work this evening playing with the "Edit in BBEdit" functionality you see in various applications- mainly FTP clients. Anyway, I knew that the FTP program Fugu supported it and it's open source and hey- I should just steal what they are doing.
So that's what I did- I ended up writing a category for NSMutableAttributedString with a method called "openInEditor", which pretty much took the contents of the string, showed it in BBEdit, and whenever a save operation is done, the contents are updated. Why NSMutableAttributedString? Because it is extended by NSTextStorage which sits in NSTextView... and that's a pretty handy place to put it.
So here's the source to the example: FMEditInBBEdit.tgz, and if you make any changes to it, leme know. I pretty much just slapped this one together, and I don't really understand anything about apple events- but I do know how to cut and paste...
-- posted 10:42 pm