Re: Launching in fullscreen gives "Funk" sound sometimes
Re: Launching in fullscreen gives "Funk" sound sometimes
- Subject: Re: Launching in fullscreen gives "Funk" sound sometimes
- From: Andy Lee via Cocoa-dev <email@hidden>
- Date: Sat, 27 Jun 2020 16:01:03 -0400
On Jun 24, 2020, at 5:23 AM, Gabriel Zachmann via Cocoa-dev
<email@hidden> wrote:
> I tried to add this in -viewDidLoad in MasterWindowController:
>
> [[[self view] window] makeKeyAndOrderFront: NULL];
Some questions that may or may not help:
- Are you sure the above line of code is being called? (I would check with a
NSLog rather than a breakpoint. Using a breakpoint can cause the active
application to change, which you may not want. You want to see what's
happening when your app launches without *affecting* what's happening.)
- Did you mean -windowDidLoad rather than -viewDidLoad?
- What is the application *supposed* to do when you type keystrokes?
- I saw the thread earlier where you moved some logic into
applicationWillFinishLaunching:. What if you add back
applicationDidFinishLaunching: and move just the full-screen toggling code
there (and keep the rest in applicationWillFinishLaunching:)?
- Are you sure your application is the active application when you're typing
those keystrokes? You can check this by adding applicationDidBecomeActive: and
applicationDidResignActive: methods to the application delegate, and having
them call NSLog. I'm not sure offhand if makeKeyAndOrderFront: makes the
application active.
- Does your window have an initialFirstResponder? Not sure this would make a
difference in your case, but might in some circumstances. The
initialFirstResponder can be set in Interface Builder.
--Andy
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden