On 18 Jun 2008, at 13:31, David Reynolds wrote:

Sure, I can email it to you I get home from work if you like?

For anyone following, here is my version of the code:

Controller.h:

#import <Cocoa/Cocoa.h>

@interface Controller : NSObject {
}
@end

No instance variables and no methods- is this bad?

Controller.m:

#import "Controller.h"

@implementation Controller
- (NSSize)windowWillResize:(NSWindow *)sender
                                        toSize:(NSSize)frameSize
{
        NSSize mySize;
        mySize.width = frameSize.width;
        mySize.height = (frameSize.width / 2);
        
        NSLog(@"mySize is %f wide and %f tall", mySize.width, mySize.height);
        return mySize;
}
@end

I set the initial height and width of the window in Interface Builder and also set the windows delegate to be my controller instance and I think that was it.

As I said earlier, I'd be very interested to know if my method is the best or the "right" way to do it and if not, which method is the best.

Thanks for your help

--
David Reynolds
[EMAIL PROTECTED]

_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to