On 10/14/06 12:03 AM, in article CD129D28-B3B6-4F25-9C79-5B71F45BDD66@adelaide.edu.au, "Paul McCann" paul.mccann@adelaide.edu.au wrote:
Allan wrote,
[...] but how do I run the script I'm looking at, with arguments? [...]
No way to do that, my reply form last time this came up http:// lists.macromates.com/pipermail/textmate/2006-September/013015.html
but how about mimicking things by pushing onto ARGV at the top of the script? That is, use something like
ARGV.concat(%w(/etc/file1 /Users/pmccann/file2))
That's an okay idea, but at that point I'd rather just run the script from the Terminal, since your approach means (1) I must change the script's internals for testing purposes, and (2) this is part of a larger problem that can't be solved quite so easily.
Allan, if you're still reading, you might want to look at how the Perl IDE/Debugger Affrus solves this problem:
http://www.latenightsw.com/affrus/index.html
A document is accompanied by metadata called "script arguments" which determine the combinations of the perl command, switches, and arguments used when running the script. A nice feature of this architecture is that you can store many script arguments and then just switch among them as a way of testing under different conditions. You might want to steal this idea for TextMate... :) m.