This is MyWindowObject.m in view mode; [Download] [Up]
#import "MyWindowObject.h" @implementation MyWindowObject NSRect frame; int temp_x, temp_y; - (void)windowDidMove:(NSNotification *)notification; { frame = [MyWindow frame]; [Hori_Location setIntValue:NSMinX(frame)]; [Verti_Location setIntValue:NSMinY(frame)]; [Done_Action setStringValue:@"windowDidMove"]; } - (void)windowDidResignKey:(NSNotification *)notification; { [Done_Action setStringValue:@"windowDidResignKey"]; } - (void)windowDidResize:(NSNotification *)notification; { frame = [MyWindow frame]; [Hori_Size setIntValue:NSWidth(frame)]; [Vert_Size setIntValue:NSHeight(frame)]; if ((temp_x < NSWidth(frame)) || (temp_y < NSWidth(frame))) [Done_Action setStringValue:@"windowDidResize (Bigger)"]; if ((temp_x > NSWidth(frame)) || (temp_y > NSHeight(frame))) [Done_Action setStringValue:@"windowDidResize (Smaller)"]; temp_x = NSWidth(frame); temp_y = NSHeight(frame); } - (void)windowDidBecomeKey:(NSNotification *)notification; { [Done_Action setStringValue:@"windowDidBecomeKey"]; } - (void)MoreInfo:(id)sender { [NSBundle loadNibNamed:@"MoreInfo.nib" owner:self]; // load nib } @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.