Modal window not in focus by default in cocoa application -


i'm trying pop alert (nsalert) message box in cocoa application. doesn't focus on alert window default. instead focus still on mainwindow of application. following code:-

[alert beginsheetmodalforwindow:[nsapp mainwindow] modaldelegate:g_popenglview didendselector:@selector(cnnotifyhardwaredecodefaildidend:returncode:contextinfo:) contextinfo:nil];

when run message box [alert runmodal] works , gives full focus alert-box. don't want way because blocks main window processing. can me this? i'm not able figure out i'm going wrong.

you can try

[[alert window] makekeywindow]; 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -