• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Keyboard Events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Keyboard Events
      • From: Nathan Day <email@hidden>
  • Prev by Date: Re: Sharing a class' data
  • Next by Date: Re: About the accessibility stuff...
  • Previous by thread: Re: About the accessibility stuff...
  • Next by thread: Re: Keyboard Events
  • Index(es):
    • Date
    • Thread