[TxMt] tm_dialog question (maybe a feature request)

Trevor Squires trevor at protocool.com
Thu Jun 5 22:29:45 UTC 2008


after tinkering with tm_dialog for a plugin[1] I have come to really
wish you could embed an 'html output' webview into a NIB.

The idea being that instead of invoking
'returnArgument:your:arguments:' you could invoke
'htmlOutput:your_command:and:arguments:' and display the results
directly in the dialog rather than outputting to an enclosing html

Note that I don't want to do async and then update the dialog with
results (to go in a listview perhaps).  The process I'm getting
results from can take a long time to complete and can generate reams
of information so I want to display the partial results as they come

Obviously you'd need to wire-up the WebView delegates to point to the
File's Owner, as well as tell the File's Owner about the WebView and
progress indicator etc etc.

I tried some cruel hacks by instantiating OakHTMLOutputManager in my
nib and wiring it all together.  Alas, I could only manage to evaluate
a "TextMate.system" calling [[webview windowScriptObject]
evaluateWebScript] via bindings.  I also managed some other
experiments to tell the OakHTMLOutputManager that it was busy (to
update the progress control).

The only other behavior I cold elicit was some spectacular crashes
trying to convince the OakHTMLOutputManager to invoke anything...
yeah, I know I'm tinkering with stuff I shouldn't :-)

So... my question: is there any way in current TM to achieve my goal
(embed html output in a dialog) - perhaps in DIALOG2 (that I haven't
looked at yet)?

Assuming the answer is 'no' - I'd just like to say that capability
could be an excellent bridge between the current tm_dialog+html_output
and a full-blown plugin.

Thanks for listening,

[1] http://github.com/protocool/ack-tmbundle/tree/master
Trevor Squires

More information about the textmate mailing list