[TxMt] Re: Save as dialogue
Matt Neuburg
matt at tidbits.com
Thu Nov 9 15:37:48 UTC 2006
On 11/6/06 4:29 AM, in article
AE0E3EEF-7BBC-41D3-A333-1E348D6D9934 at macromates.com, "Allan Odgaard"
<throw-away-1 at macromates.com> wrote:
> On 6. Nov 2006, at 12:55, Daniel Käsmayr wrote:
>
>> When saving a file there is usually a pre-selected file name given
>> in the dialogue such as for a markdown file it is
>> "untitled.markdown". The whole filename is selected but is it
>> possible to actually get only the "untitled" part selected?
>
> Not really -- it¹s a system dialog, and the normal way to improve the
> user experience here, is to not show the extension at all, but I
> found that too abstract for a program which is used with hundreds of
> different extensions.
Not really. It's quite easy to select just the filename part:
NSTextView* fe = (NSTextView*)[theSavePanel firstResponder];
NSString* f = [[fe textStorage] string];
f = [f stringByDeletingPathExtension];
[fe setSelectedRange: NSMakeRange(0, [f length])];
For an example of an app that does this, look at Amadeus II. It's very
welcome behavior. m.
--
matt neuburg, phd = matt at tidbits.com, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
More information about the textmate
mailing list