Tooltips showing from underneath an NSView/NSBox - swift

I'm running into an issue in a mac osx app. I'm displaying a popover using an NSBox and I'm noticing tooltips from elements underneath are showing through
I've created a quick demo project to show the issue: https://github.com/GP89/tooltipper
I've tried everything I can think of
setting nextResponder on the box to nil
overriding all the mouse event handlers I can find in a subclass of NSBox (eg. mouseMoved)
setting acceptsTouchEvents to false
Plus a bunch of searching online
I did find some similar issues like this one where they silence mouse events, but I can't seem to find a way of doing it for tooltips

Related

TinyMCE 4.x resize event

I've been searching around (both on SO and around the web) to try to figure out how I can get the current height of the editor after the user has resized it. The TinyMCE 4.x docs don't show any kind of resizing event. When searching around I did come across the ResizeEditor event but that seems to apply only when objects within the editor are resized (which makes it seem like a poorly named event). Despite that, I tried to listen to the ResizeEditor event just to see and it does appear to fire whenever I resize the editor (though, I'm unsure if that's because the actual editor is resizing or because elements within the editor are getting resized, too. In any case, only the event object is passed in as an argument to the listener and I don't see any way to get the editor's current height (after the resize) from that event.
So, is there a way I can do this? To listen to the editor being resized and get its height?
thnx,
Christoph
You should be able to get the entire height of the editor (Menus, Toolbars, StatusBar, content area, etc) with code like this:
tinyMCE.activeEditor.getContainer().clientHeight
tinyMCE.activeEditor.getContainer().clientWidth
When you call tinyMCE.activeEditor.getContainer() you are getting the outermost div that contains all that makes up TinyMCE. From there it is just standard JavaScript to get the relevant dimensions of that element.
Here is an example: http://fiddle.tinymce.com/qigaab/18

Visibility parameter of WPF control not visible with UI Automation?

I started writing test for a WPF application with FlaUI (UI Automation framework). Now I want to get the Visibility value of a couple of buttons.
These buttons are located on the same position in the WPF window. The first is a start button which will start a measurement. When clicked, the measurement button is replaced with a stop button. The visibility of these buttons are set in the code behind of the xaml and needs to be checked/verified.
With FlaUI I only get IsEnabled boolean and OffScreen boolean. But when using the Offscreen parameter, this boolean is not set or is set to the correct value for a couple of seconds but is changed again while the measurement is still running.
I also tried other ways, like looking for a clickable point of the not visible button. But those are not working.
Can this be done without extending the button class with an AutomationPeer and exposing a ValuePattern? I googled a bit but cannot find an (decent) answer. Hopefully someone can help.
I think an important part of your question is the word "replaced". Commonly a program draws one set of controls (in your case the start button) and later draws another set. Possible on top to hide the first, or possible by deleting them.
Commonly controls, including buttons, are drawn within other containing controls and so it may be that the button controls are not there at all, hence the visibility checks should be done on the parent or ancestor controls.
This Q&A seems related to the problem you are having and it may provide some more insight.

Cocoa graphical glitches

I added a Safari tab-like system to my Cocoa application and since, I got some serious graphical glitches. I implemented the tab system in Auto Layout, simply with buttons on a horizontal stack view with another tabless tab view, nothing special.
I started with something looking like this:
to issues like blank labels and the search field color and font are weird.
There are no errors in the console, just graphical glitches. The constraints looks okay, the keyboard and mouse events are working well as well, nothing seems to be broken other than the render.
The "Debug View Hierarchy" does not seems to have the same issue than in Runtime:
I looked around for similar graphical glitches, but could not found anything.
My app is in Swift 4.0, I am using the last stable XCode and OS X version.
I don't know where to look. I am looking for some tips to help me debug this! Thanks!
I found the problem, it was because I had a Visual Effect View with the "Vibrant Dark" effect, then the tab view were created from a custom view controller which was inheriting the Aqua apparence by default. The mix of the two apparences seems to be the cause of the graphical issues and it explained why default apparence inheritance was not an issue until I implemented my tab system which broke the main view into a separated view controller. Such a weird Cocoa display issue...

Tinyscrollbar not working with drag

I use the tinyscrollbar plugin on a site in a couple of sections.
So far, it was working great. But now for some reason, the scroll is avaible with the mousewheel but not with the drag/drop slider..
The resolution i'm using is 1360x768, but I test it in a 1920x1080 and the drag WORKS!
I check with firebug if the problem is an overlapping element over the slider but I can't see anything..
I didn't post any code, because I didn't make any changes on tinyscrollbar.js..
If you upgraded to windows 8 there is a bug where it only registers screen touch instead of both the screen and mouse... so you will need to address that
Check the z-index of the scroll bar element places it ontop of everything else (an arbitarily high z-index is fine for this purpose) as this can sometimes end up behind the custom scroll viewport meaning that when you go to drag the scroll bar you click on the wrong element.

Upon exiting UISearchDisplayController's search table view, the screen flashes

I am using UISearchDisplayController to implement the search feature on a table view. My table view cell uses custom background image.
When you first type a letter into the search textfield, the search results start appearing. However, when I click cancel at this point, the screen flashes white. This is not as noticeable if everything uses the standard white, but since my table view cell uses custom background, the white flashing is quite noticeable.
Where is this flashing coming from? Is there anything I can do to remove this flashing? (You can see this flashing on standard Apple apps too but it may not be very obvious if the table view uses white background)
Another SO post mentioned this very problem too - Customize UISearchDisplayController (search for the word "Flash")
Found a good work around for this here at Apple's Dev Forums.
Basically, the flash is by design and there isn't any way to customize/disable it. However, the poster in the link came up with a simple work around -- remove the search display table view all together (removeFromSuperView). Works absolutely fine for me.