March 2014 update
This commit is contained in:
parent
09687c4926
commit
a25938f123
1846 changed files with 21876 additions and 5203 deletions
|
|
@ -12,24 +12,18 @@
|
|||
@implementation Win : NSWindow
|
||||
-(id) init
|
||||
{
|
||||
[self
|
||||
if ((self = [super
|
||||
initWithContentRect: NSMakeRect(0, 0, 800, 600)
|
||||
styleMask: (NSTitledWindowMask | NSClosableWindowMask)
|
||||
backing: NSBackingStoreBuffered
|
||||
defer: NO];
|
||||
|
||||
[self setTitle: @"A Window"];
|
||||
[self center];
|
||||
defer: NO])) {
|
||||
|
||||
[self setTitle: @"A Window"];
|
||||
[self center];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
-(void) dealloc
|
||||
{
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)applicationDidFinishLaunching: (NSNotification *)notification
|
||||
{
|
||||
[self orderFront: self];
|
||||
|
|
@ -43,13 +37,13 @@
|
|||
|
||||
int main()
|
||||
{
|
||||
Win *mywin;
|
||||
NSAutoreleasePool *pool;
|
||||
@autoreleasepool {
|
||||
|
||||
pool = [[NSAutoreleasePool alloc] init];
|
||||
[NSApplication sharedApplication];
|
||||
mywin = [[Win alloc] init];
|
||||
[NSApp setDelegate: mywin];
|
||||
[NSApp runModalForWindow: mywin];
|
||||
[NSApplication sharedApplication];
|
||||
Win *mywin = [[Win alloc] init];
|
||||
[NSApp setDelegate: mywin];
|
||||
[NSApp runModalForWindow: mywin];
|
||||
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue