Skip to content
Commits on Oct 22, 2006
  1. @sorbits
  2. @sorbits

    • revert to r5559

    sorbits committed
  3. @sorbits

    • add -c/--center to tm_dialog (centers the dialog)

    sorbits committed
    • when tm_dialog is killed (⌃C) its dialog will close gracefully
    • when giving a relative path, check TM_BUNDLE_SUPPORT/nibs and TM_SUPPORT_PATH/nibs for the nib
  4. @sorbits

    • add new -m/--modal switch to tm_dialog, this brings up the window i…

    sorbits committed
    …n a modal state, and can be used from commands which “block” TM
    
    • allow buttons to be bound to performButtonClick: in File’s Owner (you have to add that method to a dummy File’s Owner subclass) — this method will close the window and cause tm_dialog to return. The return code of tm_dialog will be that of the buttons tag (so set to != 0 for buttons which should “cancel” and you can do ‘if tm_dialog …’) and the plist returned (on stdout) will contain a returnCode and returnButton key with the tag and the title of the button
  5. @sorbits

    • make it accept initial parameters for the controls and return the n…

    sorbits committed
    …ew set when the window close
    
    • update Example.nib to have some controls and bind these to the parameters objects
    
    It still needs a way to hook buttons to actions (okay/cancel) but basically it works (though the format will be a bit more structured, so we can pass additional info, although we probably should do that as line switches, to keep it simple).
    
    Here is an example of how to use it, from Terminal run:
    
        "$TM_SUPPORT_PATH/bin/tm_dialog" "$TM_SUPPORT_PATH/../Tools/Dialog PlugIn/Example.nib" <<< $'{searchString = foo; linesOfContext = 1; ignoreCase = 1; }'
    
    This should bring up a find panel (in TextMate, but will not give focus to TextMate), and when you close that window, it should return the options.
    
    From within TextMate, you currently can only use this with asynchronous commands (e.g. when output is set to HTML) because of how commands lock up TextMate (so the UI will appear, but it will be locked, and you need to ⌃C to “break” it).
Commits on Oct 21, 2006
  1. @sorbits

    This is really just a skeleton for things to come.

    sorbits committed
    There are two parts:
     1) Dialog plug-in for TextMate, this registers a “TextMate dialog server” connection to which it is possible to send a path to a nib file and optional arguments. This nib is then loaded in the TextMate program space, so it will appear with the proper window layer etc.
     2) tm_dialog is the shell tool to signal the Dialog plug-in
    
    The idea is that TM commands can then just create a nib for their UI and use tm_dialog to have the nib shown, and get back the “result” from this nib, w/o having to do compile things etc. A suite of standard dialogs is planned which could replace the need for CocoaDialog.
    
    There is currently one major problem with this approach: Distributed Objects seems to only allow one connection per task, so if you install this plug-in, you will lose ‘mate’ support, as that also works via Distributed Objects. Maybe there is a simple solution for this.
Something went wrong with that request. Please try again.