Package: dialog
Version: 1.0-20060221-1
Severity: important

The following script behaves differently on Debian 3.1 and Debian 4.0
in regards to navigation and more importantly the output.

----------------------------------
#!/bin/sh

DIALOG=/usr/bin/dialog

$DIALOG \
 --backtitle "Configuration" \
 --form "Enter Value" \
  0 0 0 \
  "Min"     1 1   0 1 20  0 0 \
  "Max"     2 1 100 2 20  0 0 \
  "Current" 3 1  25 3 20 12 0 \
  2>output
----------------------------------

The purpose of the script is to show a "Min" and a "Max" value and then let
the user enter a value in the "Current" field. As the field length of
"Min" and "Max" is 0 the field is non editable.

On Debian 3.1 the "Current" field is highlighted and the cursor is
also placed there. After hitting return or <TAB> + "OK" the file
"output" contains only the value entered for "Current". This behavior is
in line with the manpage.

On Debian 4.0 the cursor is placed in the first field ("Min") and no
line is highlighted. It is possible to navigate between all fields but
only the "Current" field is editable. After hitting return or <TAB> +
"OK" the file "output" contains three lines with the values of all
fields. This behavior is not in line with the manpage and is an error.

The manpage does not state whether navigation on non-editable fields are
possible or not but I think that it's an usability error. The manpage
section for the --form option is identical for Debian 3.1 and 4.0.

One of the errors mentioned above could be a re-occurrence of
#333506 wrong cursor placement on startup of "--form"

This bug could potentially be critical as dialog is often used as
the UI for debconf.

Here are the manpage section for dialog' --form option:

--form text height width formheight [ label y x item y x flen ilen ] ...
       The form dialog displays a form consisting of labels and fields,
       which are positioned on a scrollable window by coordinates given
       in the script.  The field length flen and input-length ilen tell
       how  long the field can be.  The former defines the length shown
       for a selected field, while the latter defines  the  permissible
       length of the data entered in the field.

       -  If  flen  is zero, the corresponding field cannot be altered.
          and the contents of the field determine the displayed-length.

       -  If  flen  is  negative,  the  corresponding  field  cannot be
          altered, and the negated value of flen is used  as  the  dis-
          played-length.

       -  If ilen is zero, it is set to flen.

       Use  up/down  arrows  (or  control/N, control/P) to move between
       fields.  Use tab to move between windows.

       On exit, the contents of the form-fields are written to dialog's
       output,  each  field  separated  by a newline.  The text used to
       fill non-editable fields (flen is zero or negative) is not writ-
       ten out.

Regards

Peter M.


-- System Information:
Debian Release: 4.0
 APT prefers testing
 APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.19
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages dialog depends on:
ii  debianutils                  2.17        Miscellaneous utilities specific t
ii  libc6                        2.3.6.ds1-8 GNU C Library: Shared libraries
ii  libncursesw5                 5.5-5       Shared libraries for terminal hand

dialog recommends no packages.

-- no debconf information


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to