RFC: TextMate::UI replacing Dialog (was Re: [SVN] r6738 (HTML))

Chris Thomas chris at cjack.com
Thu Apr 5 03:48:30 UTC 2007


On Mar 5, 2007, at 7:29 PM, Allan Odgaard wrote:

> On 5. Mar 2007, at 18:51, Chris Thomas wrote:
>
>> On Mar 5, 2007, at 12:40 PM, Charilaos Skiadas wrote:
>>
>>> I see no reason for it to, unless the stuff in TextMate::Dialog is  
>>> not really supposed to be called directly?
>>
>>> Chris added the TextMate::Dialog stuff, so perhaps he has some  
>>> explanation. I say merge them though. The question is which one to  
>>> keep.
>> 'Dialog' is a pretty common term. My intent was to gradually  
>> migrate new stuff into the TextMate namespace. If it's causing  
>> problems, it could be merged into the non-namespaced Dialog for  
>> now. It could even be renamed something else -- Window would  
>> probably be a better choice.
>
> Or maybe UI, shorter and we also (currently) have Dialog.menu. So  
> that would be: TexTMate::UI.menu("foo", "bar", "fud").

OK, I like 'TextMate::UI' and I've made the changes needed and  
modified all the bundles and support code to use it. This means:

* Dialog.rb is now UI.rb
* The Dialog and TextMate::Dialog classes no longer exist. They are  
succeeded by the TextMate::UI module, which now contains the dialog,  
menu, alert, request_*, show_* methods.

If TextMate::UI seems like a lot of typing, simply 'include TextMate'  
to use the short form: UI.alert, UI.menu, UI.request_color.

Does anyone have improvements, objections, better ideas? I'll wait at  
least a day before I commit this (I'll bring it up to date with newer  
bundle changes, if any, before I do the commit).

Chris




More information about the textmate-dev mailing list