Re: javascript alert function analog in gtk, probably some kind of modal dialog, but looking for a quickie



Thanks Chris,

That's very helpful, and it indeed works.

(So, given the knowledge of what to do, the net does indeed tell
exactly which 3 lines to use: one to construct, one to run, one to
destroy, as described in http://forum.gtkd.org/groups/GtkD/thread/249/
   And this is easy enough to wrap in a function.)

(And to ramble on just a little: In the ancient days of NeXTstep,
there was a function to do this, NXRunAlertPanel(.....) which was so
handy that i kept an abbrev for it in emacs so that it was always
available with a couple of keystrokes.  That function eventually
became NSRunAlertPanel(...) when Apple picked NeXT up.  And that new
function eventually got deprecated a few years back in favor of
something with more lines. :) )

Thanks again for your help.

dan





On Sun, Jul 31, 2016 at 1:24 PM, Chris Moller <moller mollerware com> wrote:
Take a look at GtkMessageDialog.  Three lines rather than one, but it seems
to do what you describe.


On 07/31/16 16:11, Dan Hitt wrote:

For front end web development, javascript provides a very handy alert(
) function.

alert("this is a message") just pops up a message for the user to click
"ok" on.

So it's a handy one-liner to stick (temporarily or not) into a piece of
code.

So i'm wondering if there's a one-line, one-argument gtk equivalent
function.

My simple-minded googling hasn't uncovered one, but i may just be too
dense to choose the right combination of search terms.

Of course if no such function exists, i don't think it would be too
hard to gin one up.

And i suppose that i will, just in case, but if one exists then i
would certainly prefer using it because there's probably a lot of
details to get wrong, or produce surprising behavior.

TIA for any info!

dan
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


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