new Options button in NSOpenPanel, how to default to "open"

Our product features a file open dialog that at the bottom has our logo and settings for the product. New in 10.11 is an Options button in the lower-left and by default this appears to be "closed". How can we make sure this is set to "open" when we present our file chooser?


Short screen recording:

http://www.screencast.com/t/gj2msU6s7Ul


Thank you.

Actually, that Options button isn't new to 10.11. It (and the corresponding new Open panel style) have actually been around since 10.8 (Mountain Lion), but back then they were only shown if iCloud was enabled. Perhaps it's now the default on 10.11? Anyway, it's just a way for the user to access the open panel's accessory view. As for whether or not it is open or closed by default, I don't think there's a way to control that, especially since it's only intended for advanced users to make changes to the file-opening behavior.


If you're willing to share why you want to have that open by default, I'll be able to help you come up with a workaround.

Thanks for the info. I have never seen the Options button before until 10.11.


Our product essentially is an open file dialog. Our product is a plug-in to another application. Users use our product to import a file in to the host application. The options we are presenting in this open dialog aren't so much "advanced", they are the regular options of our product. :-) I want it open because a user might see this closed dialog and be really confused because the closed dialog doesn't look like our product.


We would appreciate your advice for a workaround. Thank you.

First time I see this option button...

I would appreciate a workaround too ! Especially if it works with the sandbox version of the NSOpenPanel.

Many thanks...

OK, so you absolutely need the accessory view (Options)? I'm confused… is your app basically a duplicate of the Open panel or does it use the accessory view of an open panel?

I don't know for wplate, but in our case, we only need that the accessory view, that just contains a visual with info on the allowed types, is visible at the dialog launch. By default the accessory view is now closed.

For the allowed types, you can implement a method in the NSOpenPanelDelegate method to gray out unopenable files and prevent them from being selected. You don't need the accessory view.

Thanks bob133.

We use the delegate to gray out the unallowed file formats.

But this is an implicit process, and we would also prefer to detail explicitly the many formats that can be imported by our app, each time our users need to load data.

bob133,

Yes, we absolutely need the accessory view. :-)

Our product is a plugin to an application, and our plug-in imports files into the host application. Imagine a plug-in for Microsoft Word to bring in a file type that it can't handle by itself.

Our product uses the open dialog to choose the file(s) to import, and down below in the accessory view display our logo, a summary of the product settings as well as a button for modifying the import settings.


Hope this helps.

For iPerKard: I would argue that showing an exhaustive list of supported formats is unnecessary, but of course you're free to do whatever you want. The accessory view really isn't intended for just showing information, so you might consider placing that information in the top section of the open panel using NSOpenPanel's message property.


For wplate: I remember that you expressed concern over your plugin looking too much like the system-standard Open panel. How about moving your logo and options to a separate window with a "Choose File" button or something like that that runs NSOpenPanel as a sheet? Depending on whether or not you're willing to rearrange your plugin's UI, this will solve both your problems.


Both of you could file an enhancement request using the Bug Reporter asking for a way to have the accessory view visible by default. (But it's probably too late for anything to be added in 10.11, even if your request is received)

Thank you for taking the time to reply.

Do you have any more questions, or is your question pretty much settled?

If you're right then the question is settled. I thought I understood you were going to provide us with a solution, but instead you told us to redesign our product. ;-)

Sorry I couldn't provide you with a solution, but unfortunately there seems to be literally no way to have the accessory view open by default. 😟 If it were persistent (which is to say, if the user manually opened it, it would be open next time), then you might have had a chance to modify the persistent state, but since the system closes it every time there doesn't seem like a way around. You filed an enhancement request, right?

Yes, filed enhancement request and it was closed as being a duplicate. So at least two of us want the feature.

That's good to hear. They do consider the frequency of duplicates when planning future upgrades.

new Options button in NSOpenPanel, how to default to "open"
 
 
Q