NeXTSTEP AppKit Open and Save Panels

From Higher Intellect Wiki
Jump to: navigation, search

Q:  The Open and/or Save panels in my application don't resize horizontally in increments the size of a Browser column, as they should.  What's going on?

A:  Have you changed the panel's delegate?  If so, you need to implement the windowWillResize:toSize: method in the delegate and have it send the windowWillResize:toSize: message to the panel.

QA506
			
Valid for 1.0, 2.0, 3.0

Q:  Why can't I resize a SavePanel or OpenPanel with sizeWindow::?

A:  The reason that sizeWindow:: does not work with OpenPanel and SavePanel is that the size for these panels is set by the user.  When the user resizes and Open or SavePanel, the size is written to the defaults database.  When the window is brought up the next time, the size is read from the defaults database, and set.  Since you have to call sizeWindow:: before any of the runModal methods, and runModal sets the size of the panel, doing a sizeWindow:: before is too soon.

You probably shouldn't be modifying the size of the SavePanel or OpenPanel in your application anyway.  In general, users set that the way they like it, and then it's the same for all applications.

If you add an accessoryview to the panel, then it's automatically resized vertically so that the accessoryview will fit, but the width is not modified.

QA824

Valid for 2.0, 3.0


Share your opinion