Hi,
I have a tiny question: How can I invoke an inline menu by using 'tm_dialog -u' from a tmCommand written in bash?
I'd like to popup an inline menu à la Ruby
require File.join(ENV["TM_SUPPORT_PATH"], "lib/ui.rb") words = STDIN.read().split("\n") print words[TextMate::UI.menu(words)]
but using 'tm_dialog -u' command.
OK. I can embed Ruby-code in my Bash script, but it should be possible to use only
tm_dialog -p "{???}" -u
I have no problems with for instance: PLIST=$(tm_dialog -mc -p '{title="Hallo";}' RequestString)
I tried to write a old-stylish plist using menuItems, title=, etc., but up to now I couldn't find a solution.
Thanks in advance for any hint,
Hans
On 20 Jul 2007, at 14:17, Hans-Joerg Bibiko wrote:
How can I invoke an inline menu by using 'tm_dialog -u' from a tmCommand written in bash?
"$DIALOG" -u -p'{menuItems = ({title = foo;},{title = bar;});}'
A good way to learn about stuff like this is to poke around in the Ruby libraries, ui.rb in Support has the menu stuff.
Ciarán,
How can I invoke an inline menu by using 'tm_dialog -u' from a tmCommand written in bash?
"$DIALOG" -u -p'{menuItems = ({title = foo;},{title = bar;});}'
Yes, of course!! Many thanks! I tried it via "$DIALOG" -u -p'{menuItems = (title = foo,title = bar);}' which is totally wrong, of course :}
Hans
On 20 Jul 2007, at 14:53, Hans-Joerg Bibiko wrote:
Ciarán,
How can I invoke an inline menu by using 'tm_dialog -u' from a tmCommand written in bash?
"$DIALOG" -u -p'{menuItems = ({title = foo;},{title = bar;});}'
Yes, of course!! Many thanks! I tried it via "$DIALOG" -u -p'{menuItems = (title = foo,title = bar);}' which is totally wrong, of course :}
If your dialog plugin is up to date then you should get a warning to say that plist couldn't be parsed
On 20 Jul 2007, at 16:47, Ciarán Walsh wrote:
On 20 Jul 2007, at 14:53, Hans-Joerg Bibiko wrote:
Ciarán,
How can I invoke an inline menu by using 'tm_dialog -u' from a tmCommand written in bash?
"$DIALOG" -u -p'{menuItems = ({title = foo;},{title = bar;});}'
Yes, of course!! Many thanks! I tried it via "$DIALOG" -u -p'{menuItems = (title = foo,title = bar);}' which is totally wrong, of course :}
If your dialog plugin is up to date then you should get a warning to say that plist couldn't be parsed
Yes. I got such warnings like 'a ; is missing' etc. But I couldn't remember how does the old plist syntax look like ;| Many thanks again for the hint!
Hans