Re: Return codes from Prima::MsgBox

From: Anton Berezin <tobez_at_tobez.org>
Date: Wed, 1 Jun 2005 21:04:26 +0200
To: lemons_terry_at_emc.com

On Wed, Jun 01, 2005 at 01:58:11PM -0400, lemons_terry_at_emc.com wrote:

> I want to use a Prima message box with Yes and No buttons in my program.
> But I want to learn which button the user pressed. How can I do this?
>
> message_box('','Do you wish to place this order?',
> mb::Yes|mb::No);
>
> I've read about Prima::Dialog::Execute, but there is almost nothing written
> about how to use this, and I'm not sure what to do.

Look at the examples of message_box() use in examples/editor.pl. In
brief, message_box() returns you which button was pressed. In your case
it will be mb::Yes or mb::No.

Hope this helps,
\Anton.

-- 
The moronity of the universe is a monotonically increasing function. --
Jarkko Hietaniemi
Received on Wed 01 Jun 2005 - 21:04:29 CEST

This archive was generated by hypermail 2.2.0 : Sat 19 Mar 2011 - 18:35:05 CET