Keyboard Events
Keyboard Events
- Subject: Keyboard Events
- From: Marcos Tirao <email@hidden>
- Date: Fri, 7 Jun 2002 12:27:47 -0700
Hi! I have read the Cocoa documentation but I couldn't get keyboard
events work
I have the following piece of code but nothing happens. Any Idea?
mainWindow = [[NSWindow alloc] initWithContentRect:[theDisplay frame]
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO];
// Set the window properties
mainView=[[View alloc]initWithFrame:NSMakeRect(0,0,640,480)];
[mainView setMainDisplay:theDisplay];
[mainWindow setBackgroundColor:[NSColor whiteColor]];
[mainWindow setLevel:[theDisplay shieldingWindowLevel]];
[mainWindow makeFirstResponder: mainView];
[mainWindow setAcceptsMouseMovedEvents: YES];
[mainWindow setContentView:mainView];
[mainWindow setInitialFirstResponder:mainView];
[mainWindow makeKeyAndOrderFront:nil];
_______________________________________________
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.