[TxMt] tm_dialog and really long plists

Allan Odgaard throw-away-1 at macromates.com
Thu Apr 26 19:05:02 UTC 2007


On 26. Apr 2007, at 15:12, Brett Terpstra wrote:

> I had been setting a variable to the open() command, but I think  
> that it returns nil, doesn't it?  How do I get the return value  
> from the dialog into a variable using this method?  Or is that not  
> the problem...?

When you want to both send and receive stdin/out to/from a command,  
you need to use popen3.

For example like this (untested):

     require "open3"

     Open3.popen3('"$DIALOG" -m select_photoset') do |stdin, stdout,  
stderr|
       stdin << plist; stdin.close
       res = PropertyList::load(stdout)
     end





More information about the textmate mailing list