Your message dated Sat, 8 May 2010 10:48:00 +0200 (CEST)
with message-id <[email protected]>
and subject line Re: Bug#570278: dialog: --and-widget does not exit properly
has caused the Debian Bug report #570278,
regarding dialog: --and-widget does not exit properly
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
570278: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=570278
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dialog
Version: 1.1-20100119-1
Severity: important


The --add-widget flag is supposed to allow you to chain various
dialog boxes and should exit if you select NO or Cancel at any
level.  However, it simply continues on to the next level regardless
of what options are selected.

Confirmed this bug happens in this version and the version 
(1.0-20060221) on Etch.

Example code:
retval=0
dialog --yesno "1" 0 0 \
       --add-widget --yesno "2" 0 0 \
       --add-widget --yesno "3" 0 0 
case $retval in
  0) echo "Clicked YES" ;;
  1) echo "Clicked NO" ;;
  *) echo "Something else" ;;
esac

With this script, I should be able to select no to the first or
second yes/no question and it should exit right then.  It does not.
It continues on to the end.

Do I have a mistake in my code or is this a bug?

-------------       



-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-trunk-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dialog depends on:
ii  debianutils               2.30           Miscellaneous utilities specific t
ii  libc6                     2.10.2-5       Embedded GNU C Library: Shared lib
ii  libncursesw5              5.7+20090803-2 shared libraries for terminal hand

dialog recommends no packages.

dialog suggests no packages.

-- no debconf information



--- End Message ---
--- Begin Message ---
On Wed, 17 Feb 2010, Dave Vehrs wrote:

> Package: dialog
> Version: 1.1-20100119-1
> Severity: important
> 
> 
> The --add-widget flag

It's --and-widget, not --add-widget.

> is supposed to allow you to chain various dialog boxes and should
> exit if you select NO or Cancel at any level.

No, that's not what the manpage says. Manpage says this:

       You can put more than one dialog box into a script:

       -    Use the "--and-widget" token to force Dialog  to  proceed  to  the
            next dialog unless you have pressed ESC to cancel, or

       -    Simply  add  the  tokens  for the next dialog box, making a chain.
            Dialog stops chaining when the return code from a dialog is nonze-
            ro, e.g., Cancel or No (see DIAGNOSTICS).

> However, it simply continues on to the next level regardless
> of what options are selected.

Not if you write a program which matches documentation:

dialog --yesno "1" 0 0 \
       --yesno "2" 0 0 \
       --yesno "3" 0 0

> Do I have a mistake in my code or is this a bug?

Seems a mistake in the code.


--- End Message ---

Reply via email to