Make a window intercept key events
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.