[TxMt] DIALOG2 popup Question

Hans-Joerg Bibiko bibiko at eva.mpg.de
Thu Apr 17 14:31:00 UTC 2008


On 17 Apr 2008, at 15:30, Ciarán Walsh wrote:
>
> On 17 Apr 2008, at 02:16, Hans-Joerg Bibiko wrote:
>
>> If I use popup without --wait popup will insert automatically the  
>> match string. But I want to insert my self-defined string. Thus I  
>> use --wait to get a plist of the chosen item, I parse it, and I  
>> insert/replace what I want. But if I use --wait and I type  
>> something to narrow down the popup list - it works fine - but I do  
>> NOT see what I'm typing.
>
> Perhaps you have some local changes (e.g. still on 10.5 SDK?)  
> because this works fine for myself and others. If you look at the  
> ui.rb in Review/Support/lib it has a complete() method which uses  
> the --wait option

I checked out DIALOG2 again and compiled it on 10.5.2 SDK 10.4 (I  
didn't change anything).

I run all tests in /ui.rb. Each works brilliant (esp. the nested  
example - very nice!). Fine.

Then I wrote a tmCommand in Ruby using the complete() method. It works  
fine.
But if I write an other tmCommand in BASH, it works but I do not see  
what I'm typing and the output behaviour is also different (it gives  
me back the plist as well).

Here the codes:
BASH
echo '{suggestions = (
		{display = "abbauen";},
		{display = "abarbeiten";},
		{display = "ab";},
		{display = "bringen";},
		{display = "brachte";},
	);}' | "$DIALOG" popup --wait --initial-filter "$TM_CURRENT_WORD"


RUBY
#!/usr/bin/env ruby -wKU
require ENV['TM_SUPPORT_PATH'] + '/lib/textmate.rb'
require ENV['TM_SUPPORT_PATH'] + '/lib/ui.rb'
@choices = [
       {'display' => 'abbauen'},
       {'display' => 'abarbeiten'},
       {'display' => 'ab'},
       {'display' => 'bringen'},
       {'display' => 'brachte'},
     ]

TextMate::UI.complete(@choices)




Attached are both scrits I used. Please check the BASH script if it  
works for you.


Thanks,

--Hans


-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIALOG2 popup Bash.tmCommand
Type: application/octet-stream
Size: 893 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20080417/59584e81/attachment.tmCommand>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIALOG2 popup Ruby.tmCommand
Type: application/octet-stream
Size: 1024 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20080417/59584e81/attachment-0001.tmCommand>


More information about the textmate mailing list