[SVN] RFC: async window support for tm_dialog
Allan Odgaard
throw-away-1 at macromates.com
Wed Nov 29 02:27:15 UTC 2006
On 29. Nov 2006, at 02:24, Chris Thomas wrote:
> [...]
> I think what's needed is a separate invocation of tm_dialog, so
> you'd have something like a standard event loop (psuedocode):
>
> $tm_dialog -a --parameters '{wrapAround = 1; regExp = 1;}' $TM_NIBS/
> SearchDialog.nib
> [...get window token in $token...]
>
> # event loop
> while( 1 )
> {
> # wait for user to press something
> $tm_dialog --wait-for-input $token
> ... check plist to determine control clicked, etc ...
> }
Ah, that seems pretty simple -- I like that a lot!
With this approach, we can use the current returnArgument: method.
I.e. just make that method not close the window (when window has been
opened as async).
Two things I am wondering about:
1) should tm_dialog -a really return a plist? because we _always_
want just the token?
2) should --wait-for-input only return the arguments given to
returnArgument:… or the full data model? Here I wouldn’t say we
_always_ want the former, but 99% of the time, we would.
More information about the textmate-dev
mailing list