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

There were no errors. shown to user, until hovering shows the proper error #3271

Open
gboudreau opened this Issue Nov 1, 2018 · 5 comments

Comments

2 participants
@gboudreau

gboudreau commented Nov 1, 2018

  • Sequel Pro Version: build from source @ 98cec9a
  • macOS Version: 10.14

Steps To Reproduce

  1. Connect to a database
  2. Execute a query that will result in an error: SELECT * FROM users WHERE patate = 1 or something...
    The error panel will appear, and display the error correctly: Unknown column 'patate' in 'where clause'
  3. Execute a query that will work: SELECT * FROM users
    The error panel will disappear, and results will be shown.
  4. Re-execute the query that results in an error: SELECT * FROM users WHERE patate = 1

Expected Behaviour
Error panel should re-appear, and display the same message as before. Instead, the panel appears, but displays: There were no errors. until you hover over that text field; at the point, that text gets replaced with the correct error message.

@dmoagx

This comment has been minimized.

Member

dmoagx commented Nov 1, 2018

Can reproduce.

@gboudreau

This comment has been minimized.

gboudreau commented Nov 1, 2018

If you'd like, I could take a look, see if I could find what is causing this. Any idea what could cause this or where to start?

@dmoagx

This comment has been minimized.

Member

dmoagx commented Nov 1, 2018

I guess the cause will be pretty similar to the issue with the divider line not moving: AppKit expects some call to mark the display cache as invalid, which SP doesn't do.

gboudreau added a commit to gboudreau/sequelpro that referenced this issue Nov 1, 2018

@gboudreau

This comment has been minimized.

gboudreau commented Nov 1, 2018

I couldn't find why; I tried to disable the spliView animation, or making sure the [errorText setString:] was executed on the main thread, or calling [errorText setNeedsDisplay] and [errorText setNeedsLayout] but nothing helped... until I did [errorText setString:[errorText string]]; in [NSSplitViewDelegate splitViewDidResizeSubviews]...
See gboudreau@b68bd85

Pretty sure a better fix could be found, but I couldn't find it.
Let me know if you'd like a PR.

@dmoagx

This comment has been minimized.

Member

dmoagx commented Nov 8, 2018

While looking at this I stumbled over a bigger issue:
Apple's -[NSSplitView adjustSubviews], which we override without calling super, does a lot of stuff and also modifies some internal state of the split view (at least I think so).
For me that is an indicator that this method never was designed to be overridden (or at least not without calling super), which means there could be all kinds of fun down the road… sigh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment