On 4/16/08 1:29 PM, in article nemoWed041608032838@news.netfielders.de, "Christoph Koehler" christoph.koehler@gmail.com wrote:
In article C42BA0B9.3B603%matt@tidbits.com Matt Neuburgmatt@tidbits.com wrote:
In my Ruby script which is called somewhat indirectly, I tried saying `CocoaDialog blahblah` but it didn't work; evidently the indirectness means that I'm not inheriting some path trickery from TM. So I changed it to this:
`#{ENV['TM_SUPPORT_PATH']}/bin/CocoaDialog.app/Contents/MacOS/CocoaDia logblahblah`
That works. But is there a better way? Thx - m.
Here's how I do it:
#! /usr/bin/env ruby require ENV['TM_SUPPORT_PATH'] + '/lib/ui' test = TextMate::UI.request_string(:title => "Some title", :prompt => "Please type something here")
Interesting - thanks for that. Unfortunately, this little library doesn't implement "filesave" (which is what I want to use), and its most general bottleneck method, cocoa_dialog, is private. So I guess I'll just stick with what I've got... m.