On Apr 10, 2009, at 12:31 AM, Kyle Sluder wrote:
On Thu, Apr 9, 2009 at 6:52 PM, Dave Keck <davek...@gmail.com> wrote:
To satisfy both these requirements, I would first disable window
resizing for your window in IB. Then, somewhere in your app's
initialization code, do a little something like this:
Calculator.app apparently does the opposite, from looking at its nib.
It starts with resize enabled and then somehow eliminates the
drag-resizing functionality.
I bet it calls setShowsResizeIndicator: in awakeFromNib. This hides
the grow box but doesn't suppress drag-resizing. Using F-Script
Anywhere in Calculator.app, I see the window's delegate does indeed
implement windowWillResize:toSize:, which is presumably how it
suppresses drag-resizing.
I see the window delegate also implements windowShouldZoom:toFrame:.
I suspect that method cycles the window state between Basic/Scientific/
Programmer and returns NO.
On a side note: I notice the Basic/Scientific/Programmer menu items
are not in the nib, so they must be generated programmatically at
startup. I also can't find the views for these three modes in the
nib, so either I'm missing something or they are generated
programmatically, which seems like a strange approach.
On another side note: I hoped the Calculator sample code could answer
all our questions, but it is so out of date (2003) that Xcode 3.1.2
can't open it, so clearly it's not the code for the current
Calculator.app.
--Andy
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com