Good time, everybody. I use WebView in my app, which is loading html with 
flash. I'm trying to catch keyboard events, so i added the next function to my 
NSWindow's class - (void)keyDown: (NSEvent *) event
{ NSLog(@"KEYDOWN: %@", event);
}
 
It works while i didn't press on any buttons in my flash, when i pressed on 
button in flash, my app doesn't listen keyboard events, how to solve it?

and the next question:

i override initWithContentRect method and made my app's decoration with 
styleMask: NSBorderlessWindowMask

My app has 2 buttons: "normal mode" and "fullscreen mode":

NSSizesize = [[NSScreenmainScreen] frame].size;

-(IBAction) normal_mode:(id)sender
{
win= NSMakeRect(((size.width/2) - 512), ((size.height/2) - 384), 1024, 768);
SetSystemUIMode(kUIModeNormal, 0);
[selfsetFrame:windisplay:YESanimate:YES];
}

-(IBAction) fullscreen_mode:(id)sender
{
win= NSMakeRect(0, 0, size.width, size.htight);
SetSystemUIMode(kUIModeNormal, 0);
[selfsetFrame:windisplay:YESanimate:YES];
}

it works, but i need add TitleBar with buttons(minimize, close, maximize) to my 
window while i pressing "normal mode" button. I tried add:
unsignedintstyle = (NSClosableWindowMask| NSResizableWindowMask);
[self setFrame:win display:YES animate:YES styleMask:style];

but i haven't got a result, how can i change titlebar of my app when i pressed 
any buttons?



      
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to