• 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
Make a window intercept key events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Make a window intercept key events


  • Subject: Make a window intercept key events
  • From: Arthur VIGAN <email@hidden>
  • Date: Fri, 30 Aug 2002 12:51:02 +0200

Hi,

I have a little problem with a window which doesn't intercept key events. My
application is a bit particular: it has no user interface, except that
window which is opened by the app when needed to choose a particular
directory. But when I begin an NSOpenPanel as a sheet for that window, I
can't use the keyboard shortcuts (escape for "Cancel", ...), and I can't
fill the "Go to:" text field although it appeard to be selected.
Here is the part of my code for choosing the directory (my class is a
sub-class of NSWindowController):

- (IBAction)choosePath:(id)sender
{
NSOpenPanel *openPanel = [NSOpenPanel openPanel];

[openPanel setAllowsMultipleSelection:NO];
[openPanel setCanChooseDirectories:YES];
[openPanel setCanChooseFiles:NO];

[openPanel beginSheetForDirectory:nil
file:nil
types:nil
modalForWindow:[self window]
modalDelegate:self
didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:)
contextInfo:nil];
}

Is there something wrong?

Thanks in advance,

Arthur
_______________________________________________
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: Make a window intercept key events
      • From: Pierre-Olivier Latour <email@hidden>
  • Prev by Date: detachDrawingThread problem
  • Next by Date: Re: Make a window intercept key events
  • Previous by thread: detachDrawingThread problem
  • Next by thread: Re: Make a window intercept key events
  • Index(es):
    • Date
    • Thread