Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activating SRRecorderControl #13

Closed
agg23 opened this issue Apr 11, 2013 · 9 comments
Closed

Activating SRRecorderControl #13

agg23 opened this issue Apr 11, 2013 · 9 comments

Comments

@agg23
Copy link

agg23 commented Apr 11, 2013

I set up the frameworks after a bit of work and added a custom view with the class of SRRecorderControl, but now when I click on the control, nothing happens. It doesn't start to capture key commands, nor does it call anything (to my knowledge). What am I doing wrong?

@Kentzo
Copy link
Owner

Kentzo commented Apr 12, 2013

Have you checked code in the demo?

Could you attach sample project?

@agg23
Copy link
Author

agg23 commented Apr 13, 2013

I'm just calling

    [self.srRecorderEditKeyboardShortcut setAllowedModifierFlags:NSShiftKeyMask | NSAlternateKeyMask | NSCommandKeyMask
                                 requiredModifierFlags:0
                              allowsEmptyModifierFlags:NO];

whereas srRecorderEditKeyboardShortcut is the IBOutlet of my custom view SRRecorderControl. SRRecorderControl's delegate and file owner is set to my window controller, where I call the above code. What am I missing?

@Kentzo
Copy link
Owner

Kentzo commented Apr 14, 2013

This looks right. The problem is somewhere else.
Maybe your app crashes when you show the view with the recoder control? Check the debugger output for any errors.

Could you create a demo project and try to reproduce the issue?

@agg23
Copy link
Author

agg23 commented Apr 14, 2013

Hm... I created a new test project, did the same things as I did in my main project, and it suddenly works... I have no idea what I've done wrong in my main...

Edit: After playing around some more, it seems that the problem arrises from me loading the SRRecorderControl in a sheet instead of in the main window. Once I move it over to the main window, it works fine. What would be preventing it from working with the sheet?

@Kentzo
Copy link
Owner

Kentzo commented Apr 14, 2013

I would be able to answer If you provide demo project that demonstrates the issue

@agg23
Copy link
Author

agg23 commented Apr 15, 2013

Here you go. Took a bit to remove all of the fluff from the app.

https://dl.dropboxusercontent.com/u/11736218/App.zip

@Kentzo
Copy link
Owner

Kentzo commented Apr 15, 2013

Ok, I was able to reproduce the issue. It's not related to SR, but some strange behavior of title-less NSWindow (and NSPanel): if you add NSTextField to the PreferenceWindow, you'll find that it won't be made first responder.

The "workaround" is to enable Title Bar option in IB. Since it's sheet window, title won't be shown anyway, but this option somehow affects ability of the window to become key.

@agg23
Copy link
Author

agg23 commented Apr 15, 2013

Thank you very much. That fixed it. That is a rather weird "feature" (bug?).

@Kentzo
Copy link
Owner

Kentzo commented Apr 15, 2013

The ability to specify title bar was introduced recently and I didn't have chance to play with it yet.
I recommend you to look through Apple forums, because I remember that it's known issue and was commented by Apple employee.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants