[TxMt] Re: Ruby + UI.dialog question.
Jeff Keen
jeffxl at gmail.com
Wed Oct 28 22:25:03 UTC 2009
I'm actually have the same issue. Once the .nib gets loaded in TextMate,
everything locks up. I can move the custom window around, but I can't type
into the input boxes, close the window, or click any of the buttons.
The change that that was mentioned—removing the block from the
dialog.wait_for_input—did not have any effect. I have, however, figured out
that if I change my bundle command's output from "Replace Selected Text" to
"Show As HTML", the window loads and works properly. Having that output type
isn't functional for what I'm trying to do, though.
Is having "Show As HTML" as the bundle command output a requirement when
using TextMate::UI.dialog to load a custom .nib?
Jeff
drukepple wrote:
>
> I have a question about UI.dialog and/or some general Ruby usage. I
> apologize for asking about Ruby stuff here, but this particular problem
> seems tied directly to the use of UI.dialog, although I'm pretty sure the
> issue is actually a Ruby one on my part (I've been fine Googling for other
> Ruby issues, but this one seems pretty niche).
>
> Here's some stripped down code that works:
>
> TextMate::UI.dialog(:nib => nib, :parameters => {}, :center => true) do
> |dialog|
> dialog.parameters = {'username' => "moo"}
> dialog.wait_for_input do |params|
> puts params["username"]
> end
> end
>
> But then I go to try and actually use something with my params hash, like
> putting it into a variable declared earlier:
>
> username = ""
> TextMate::UI.dialog(:nib => nib, :parameters => {}, :center => true) do
> |dialog|
> dialog.parameters = {'username' => "moo"}
> dialog.wait_for_input do |params|
> username = params["username"]
> end
> end
> puts username
>
>
> Now I get a task that seems to hang, which when forced to quit will report
> the following error in Console:
>
> TextMate[13634] *** -[NSMachPort handlePortMessage:]: dropping incoming DO
> message because the connection or ports are invalid
>
> Really don't know what to do with this. Sorry, I'm not good enough at
> either
> TextMate's extra features, nor at Ruby. I'm sure this is just a
> combination
> of both of those deficiencies.
>
> Thanks,
> Dru
>
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
>
>
--
View this message in context: http://www.nabble.com/Ruby-%2B-UI.dialog-question.-tp25605385p26103261.html
Sent from the textmate users mailing list archive at Nabble.com.
More information about the textmate
mailing list