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

NSTableView support #15

Closed
jnorth opened this issue Jul 7, 2013 · 13 comments
Closed

NSTableView support #15

jnorth opened this issue Jul 7, 2013 · 13 comments

Comments

@jnorth
Copy link

jnorth commented Jul 7, 2013

SRRecorderControls in view-based NSTableViews do not seem to work. The control doesn't receive a -mouseUp: message.

Subclassing NSTableView and over-riding the -mouseDown: method to do nothing allows the recorder to function. Perhaps there is a better solution?

Download Example Project

@Kentzo
Copy link
Owner

Kentzo commented Jul 7, 2013

I don't think so, because table view is first responder for mouse events and doesn't forward them by default.

@Kentzo
Copy link
Owner

Kentzo commented Jul 7, 2013

If you don't need to represent a dynamic list of shortcuts, I recommend you to just as many recorder controls as you need. They are very tiny from performance and memory usage perspective.

@jnorth
Copy link
Author

jnorth commented Jul 8, 2013

Thanks for your confirmation. It's definitely an edge-case.

I'm using an NSTableView because my app has a lot of shortcuts--too many to fit on a screen--not for performance reasons. See the Key Bindings preferences in Xcode for something similar.

Thank you for your work.

@jnorth jnorth closed this as completed Jul 8, 2013
@Deger
Copy link

Deger commented Jul 30, 2013

Want this too, any way work around?

@Kentzo
Copy link
Owner

Kentzo commented Jul 30, 2013

@Deger Subclass NSTableView.

@Deger
Copy link

Deger commented Jul 30, 2013

@Kentzo How? I have tried NSTableView and NSCollectionView, not work. Can you paste some code here?

@Frostbitee08
Copy link

@Kentzo I am running into the exact same issue @Deger ran into, and I subclassed NSTableView and overrode the method like so:

-(BOOL)validateProposedFirstResponder:(NSResponder *)responder forEvent:(NSEvent *)event {
return YES;
}

However, this still did not fix the issue. Suggestions?

@Kentzo
Copy link
Owner

Kentzo commented Sep 9, 2013

@Frostbitee08 If you upload the demo project that demonstrates the issue I'll take a look.

@Frostbitee08
Copy link

@Kentzo here is the demo project.

Download Demo

Kentzo added a commit that referenced this issue Sep 10, 2013
…o the next responder even when handled.

This caused problems in view-based Table Views.
@Kentzo
Copy link
Owner

Kentzo commented Sep 10, 2013

@Frostbitee08 @Deger @jnorth Please try most recent develop branch.

@Kentzo Kentzo reopened this Sep 10, 2013
@Frostbitee08
Copy link

@Kentzo Seems to be working as far as I can see. Thanks!

@jnorth
Copy link
Author

jnorth commented Sep 12, 2013

Thanks @Kentzo, looks good for me as well.

@Kentzo Kentzo closed this as completed Sep 13, 2013
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

4 participants