lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Jun 22, 2016 at 7:14 PM, Coda Highland <chighland@gmail.com> wrote:
 
on Windows, you can shell out to
PowerShell instead of cmd.exe to get a native dialog.

Windows XP doesn't have PowerShell.
(Yes, I must support Win XP)


On UNIX-based systems, at least, you could wrap around the `dialog`
command, though of course that adds a dependency.

The main idea of "alert" is to be ready to run everywhere,
without asking user to install any dependency.

 
I would point out that there are better alternatives than popping open
a shell window on almost all platforms, though.

In what aspect these alternatives are better?
IMO, the decision which one is better is a matter of taste  ;-)
I agree that "alert" should give user a choice to use what he wants.

 
there's xmessage, gmessage, kdialog, zenity, xdialog, shellgui, gxmessage, and gtkdialog that I
can find on a quick search; most users will have one of the first
three installed already.

I doubt that it would have 100% *nix systems coverage.
Meanwhile, a terminal emulator exists on every system,
including *nices on low memory devices.

Fortunately, "alert" is configurable enough to do what you want.
"alert" already supports "zenity" and can easily support other
dialog-like utilities.
You can also set priorities to reflect your personal preferences, so
xmessage/gmessage/kdialog/zenity/xdialog/shellgui/gxmessage/gtkdialog
will be used whenever possible.

 
On OSX, you can invoke osascript with a tiny little AppleScript to pop open a message box.

Yes, this is a good idea to add this feature for OSX native dialog lovers.
Thanks for suggestion
(and for your opinion that some people may consider native dialog as more nice-looking alternative).
BTW, feel free to create a patch ;-)