0

Stuck at this for some time now.

Does anyone know how to disable text input field on a NSSavePanel? This is how I am using it:

NSSavePanel *panel = [NSSavePanel savePanel];
[panel beginSheetModalForWindow:window completionHandler:^(NSInteger result)
{
...
}

enter image description here

Any help is really appreciated.

Thanks

Leo
  • 1,547
  • 3
  • 24
  • 40
  • 2
    This sounds like a very strange thing to want to do. The entire point of the "Save As" dialogue is to allow the user to specify another name for the document. If you just want to save it under a different name programmatically, don't present the dialogue. – jscs May 20 '13 at 18:42
  • I want to take where user wants to save the file but doesn't want to allow name change as this is the backup file and changing name would invalidate it. – Leo May 20 '13 at 18:44
  • 5
    I would say don't present a save panel then; use an Open panel to choose just a directory. See, e.g., [How can I use NSSavePanel to select a directory?](http://stackoverflow.com/q/3396081) – jscs May 20 '13 at 18:48
  • That makes sense. I am gonna try it now. Thanks – Leo May 20 '13 at 18:53
  • 1
    Sure thing! Please come back when you've resolved your issue and either post an answer describing your solution, or flag for a moderator to mark this as a duplicate of the question I've linked. – jscs May 20 '13 at 18:55
  • Thanks. That did the trick. I have also flagged the question to moderator. – Leo May 20 '13 at 19:48

0 Answers0