aptonic / dropzone4-actions

Add-on actions and API Docs for Dropzone 4
https://aptonic.com
363 stars 57 forks source link

What if I want to have another OptionsNIB? #68

Closed graycreate closed 8 years ago

graycreate commented 8 years ago

Currently, I was developing a plugin for dropzone3, I found dropzone3 can only support Login, ExtendedLogin, APIKey, UsernameAPIKey, ChooseFolder, ChooseApplication and GoogleAuth. But I want to have another OptionsNIB, something like "new_name_suffix".

Is it possible ?

raguay commented 8 years ago

Hi,

You can make your own dialog that the script can call when you click on it. I do this for some of my custom actions. You use the $dz.cocoa_dialog() function to create the dialog and get the results back. Then the drag option does the work specified in the click option. Read the documentation here: https://github.com/aptonic/dropzone3-actions/blob/master/README.md#cocoadialog

On Sat, Aug 6, 2016 at 2:39 PM, ghui notifications@github.com wrote:

Currently, I was developing a plugin for dropzone3, I found dropzone3 can only support Login, ExtendedLogin, APIKey, UsernameAPIKey, ChooseFolder, ChooseApplication and GoogleAuth. But I want to have another OptionsNIB, something like "new_name_suffix".

Is it possible ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/aptonic/dropzone3-actions/issues/68, or mute the thread https://github.com/notifications/unsubscribe-auth/ACX0x0WDrXFvg0YyFQLBX9OO_znykUrSks5qdDoWgaJpZM4JeOjM .

graycreate commented 8 years ago

Hi reguay, You mean I can custom the plugin config page by cocodialog? See below,

aptonic commented 8 years ago

@ghuiii You can't add a custom OptionsNIB, but for configuring an action calling Cocoa Dialog is the next best solution. The first time your action runs you use Cocoa Dialog to get the needed configuration from the user and then you save that using $dz.save_value and use it next time the action is run. If your action is useful enough then I will then potentially look at adding a custom OptionNIB specifically for your action in the next version.