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

Fixed crash if color picker left open when control is deallocated. #7

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Dejal
Copy link
Contributor

@Dejal Dejal commented Aug 30, 2015

For example when switching to another view. The color picker is now
automatically closed, which is a better experience, and avoids the
crash.

For example when switching to another view.  The color picker is now
automatically closed, which is a better experience, and avoids the
crash.
@DarkDust
Copy link
Contributor

Removing the notification observer is correct, but we should only reset the panel's target if panel.target == self. Someone might have changed the target of the shared panel.

@Dejal
Copy link
Contributor Author

Dejal commented Aug 30, 2015

There's no getter for the target property, so there's no way to check its value. Elsewhere in the code sets it to nil. Though it's weak linked, so probably don't actually need to reset it.

@Dejal
Copy link
Contributor Author

Dejal commented Aug 30, 2015

Actually, not sure about the weak linking.

@DarkDust
Copy link
Contributor

Oops, it really only is a setter without a getter. How strange. I seems to be weak, just ran a quick test and it didn't increase the retain count of my object (it if weren't, dealloc of DFColorWell wouldn't be called, would it?)

@Dejal
Copy link
Contributor Author

Dejal commented Aug 31, 2015

Strange indeed. I agree that it seems to be weak, so I've removed those two lines. Thanks for the feedback.

The mouse event doesn't work inside a table view.  Not sure why, but
using a gesture recognizer works around the issue.
@danieljfarrell
Copy link
Owner

Hmmm mouse events don't work inside the table view. Would making the table view the first responder solve this problem?

@Dejal
Copy link
Contributor Author

Dejal commented Sep 20, 2015

Other mouse events work if you set the highlight mode to None. But the -mouseDown: doesn't work, hence my workaround.

@DarkDust
Copy link
Contributor

DarkDust commented Sep 7, 2016

Isn't this already solved by merging #10? Or is there something that still needs to be fixed?

@danieljfarrell
Copy link
Owner

I will take a look. There are merge conflict.

Fixes an issue on High Sierra where the color became white every time
the control is loaded, as the default color was changing the app's
settings before it could populate the color well.
@Dejal
Copy link
Contributor Author

Dejal commented Sep 24, 2017

Sorry, did I accidentally trigger a pull request? I was fixing an issue on my fork of the project: sending the action when setting the default color was overriding my app's settings on High Sierra. See my branch for my changes.

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

Successfully merging this pull request may close these issues.

None yet

3 participants