Blank NSComboBox on OS X Yosemite - macos

I have a set of NSComboBox elements shown within the toolbar of an NSPanel, all created with XCode/Interface Builder. When I click on them on Yosemite, all I can see is a black box where the combo box items should be. On earlier versions of OS X this works just fine. No exceptions are logged at all. Here's a screen capture:
Any idea of what could be broken? I can't see any relevant release notes from Apple.

Bypassed this by using a NSPopup instead.

Related

SwiftUI: The Structured Editing Popover (Command + Click) does not show up

In SwiftUI tutorial (link) it says to:
Command-click the text view’s initializer to show the structured editing popover, and then choose Embed in VStack
However, it does not work for me.
What is the command for that?
What that deprecated already?
If it helps someone out there, you must have changed Xcode shortcut preferences to go to "Definition" on "Command Click".
So now for seeing the structured editing popover, use "Control Command Click".
Seems to be an Xcode quirk caused by having the canvas hidden. Bring the preview canvas back on screen and the Command + Click functionality returns to normal:
I've seen similar weirdness with two Xcode windows open… especially if one window is hiding the Preview.
Another quirk mentioned above: the Library picker is missing the Views and Modifiers tab sometimes. Again, open the Preview Canvas and the Library will snap back to normal. You might also have to bring focus to the canvas (i.e. click on something there).
Close and reopen Xcode should help. Like code completion sometimes is not working the popover also sometimes stuck.
I found that command + Left Click on Text (within the .swift file) took me to the definition of Text, however command + Right Click caused the menu containing "everything" to appear, from which I was then able to select "Show in UISwift inspector".
I couldn't get anything to popup in the Canvas.
Using Xcode 12.2 on macOS 11.0.1
According to Apple's release notes for the latest Xcode 11 beta release, the inspector and preview features don't currently work without MacOS Catalina 10.15 (the current stable/public release is MacOS 10.14.6 at the time of posting).
You'll either need to wait until the publicly released version of Mac OS 10.15 or gain access to a beta version of MacOS to use these.
Source (Apple | Xcode 11 Release notes):
Xcode 11 supports development with SwiftUI. (22843503)
Note: SwiftUI previews and inspectors are only available when running on macOS Catalina 10.15.
Restart the project for 1 or 2 times and CMD+B(Build) your project one the start.

NSWindows' toolbar button not work

I'm building a Mac OS X app.
I just tried to set a toolbar button to show/hide a toolbar on NSWindow's title bar. But it doesn't do anything for me.
Initially I tried to achieve that with the checkbox in the interface builder.
Toolbar button I expected here is below.
I tried the checkbox in the interface builder to get the button like below.
I thought it could be no longer available in the latest El Capitan, then tried it with Xcode 4.6 on Lion but I could not see the button, neither.
I found the following page to explain how to add a button to the title bar on this site.
How to use NSTitlebarAccessoryViewController?
And I could manage to do that by myself.
But I'm still wondering if there is a way to use the default button.
Any suggestions would be appreciated.
I am pretty sure Apple dropped the toolbar button with OS X Lion. I assume the checkbox is only there for older versions. (Snow Leopard and earlier)
Adding your own button using NSTitlebarAccessoryViewController is a good idea!

Checkbox NSButton inside NSPopover changes colors when running

I'm getting a strange behavior of checkboxes inside NSPopover on OS X 10.10.3.
Colors of checkboxes are distorted but other elements like regular buttons or labels have correct colors.
Top image: how NSPopover renders in a running app (black background is from another app).
Bottom image: NSPopover view in Interface Builder.
Visual Effect Views (like used in NSPopover) are totally messed up in OS X Yosemite. Luckily they are working fine now in El Capitan.
A workaround on Yosemite should be to set the appearance property of each checkbox, label, scrollView etc. to NSAppearanceNameAqua

nsoutlineview cell background changes color during animations on Yosemite

I have an app that has been running well under OS X 10.7 through 10.9. When it runs under 10.10, a visual problem appears that I am having trouble tracking down.
In essence, it appears that the cell background color changes during the animation of expanding and collapsing the outline. Here is a very brief (slo-mo) video showing the problem:
http://www.thirdstreetsoftware.com/downloads/Misc/paletteclip.mp4
The problem shows up only when run on OS X 10.10, regardless of whether it was built with Xcode 5 or 6, on 10.9 or 10.10.
Any idea where I should be looking for the problem?
Try to migrate to view-based table view, as cell-based table view is deprecated.

IKImageBrowserView images won't show in OS X 10.5

The Apple Demo IKImageViewDemo does not seem to work correctly in 10.5.
The control is there, but there are no visible images. The images are there because when you click and drag where an image is supposed to be, the ghost of the image appears and drags.
Is there an alternative to using the IKImageBrowserView for users on Leopard 10.5-10.5.8, or is there an alternative "gallery" style control?
Anything I need to do special in Interface Builder? Any option that needs to be / not be checked?
IKImageBrowserView is available in OSX 10.5 and later:
http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/IKImageBrowserView/IKImageBrowserView_Reference.html
Sample projects that work on OSX 10.5:
http://developer.apple.com/library/mac/#samplecode/ImageBrowser/Introduction/Intro.html
http://developer.apple.com/library/mac/#samplecode/IKImageBrowserViewWithCoreData/Introduction/Intro.html

Resources