Re: Apps whitout nib
Re: Apps whitout nib
- Subject: Re: Apps whitout nib
- From: James Chen <email@hidden>
- Date: Tue, 17 Feb 2004 09:38:26 +0800
Hi,
try using NSBackingStoreBuffered instead of NSBackingStoreNonretained
win = [[NSWindow alloc] initWithContentRect:contentRect
styleMask:(NSTexturedBackgroundWindowMask | NSTitledWindowMask |
NSClosableWindowMask | NSMiniaturizableWindowMask)
backing:NSBackingStoreBuffered defer:1];
Should be better,
James
------------------------------------
Ulead Systems Inc.
James Chen
Software Engineer
Image Div.
------------------------------------
On Feb 17, 2004, at 8:08 AM, Wezzy wrote:
NSWindow * win;
NSApplication * app;
NSRect contentRect;
NSButton * bt;
NSAutoreleasePool * pool;
pool = [[NSAutoreleasePool alloc] init];
contentRect = NSMakeRect(0,0,330,330);
win = [[NSWindow alloc] initWithContentRect:contentRect
styleMask:(NSTexturedBackgroundWindowMask | NSTitledWindowMask |
NSClosableWindowMask | NSMiniaturizableWindowMask)
backing:NSBackingStoreNonretained defer:1];
bt = [[NSButton alloc] initWithFrame:contentRect];
[win setTitle:@"Test Window"];
[win setContentView:bt];
[win setDelegate:bt];
//[win makeKeyAndOrderFront:nil];
app = [NSApplication sharedApplication];
[app runModalForWindow:win];
[app release];
[pool release];
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.