Sublime Forum

yes_no_cancel_dialog() button captions

#1

The yes_no_cancel_dialog(string, <yes_title>, <no_title>) method’s API documentation says:

Displays a yes / no / cancel question dialog to the user. If yes_title
and/or no_title are provided, they will be used as the text on the
corresponding buttons on some platforms. Returns sublime.DIALOG_YES,
sublime.DIALOG_NO or sublime.DIALOG_CANCEL.

Does anyone know which platforms the yes_title and/or no_title button captions will be displayed on?

I use Linux and they are shown, I had a look on Windows XP (32 bit) and they are not shown but I suspect they would be on more recent versions of Windows. I would guess that they are shown on OSX simply on the basis that it is UNIX and therefore the code is probably similar to Linux.

Thanks.

0 Likes

#2

it definitely works on Windows 7:

sublime.yes_no_cancel_dialog('title', 'Yeah, Ok!', 'No way!')

0 Likes

#3

Also Windows 10, unsurprisingly. Will test on Linux later.

a

0 Likes

#4

Thanks Guys.

OSX anyone? Just paste Keith’s string into the console:

sublime.yes_no_cancel_dialog('title', 'Yeah, Ok!', 'No way!')

@FichteFoll As per my original post, it works on Linux, at least on my Linux Mint 17 desktop, since LM17 is built on Ubuntu 14.04 then that too.

My bet is that it is only ancient versions of OSes that it fails on, and probably not many ST users using ancient OSes. I tested with Win XP 32 only because I happen to have a VirtualBox machine of that but nothing newer.

0 Likes

#5

OS X 10.10.5:

0 Likes

#6

No issues on Arch:

I guess it’s safe to say that this API is universally supported by all currently maintained operating systems, which XP does not fall under. No idea about Vista.

0 Likes

#7

[quote=“FichteFoll, post:6, topic:25736”]
I guess it’s safe to say that this API is universally supported by all currently maintained operating systems, which XP does not fall under.[/quote]
I agree. Thanks all.

0 Likes