ask_tty assumes numeric options
Brought to you by:
linkjuggler,
mtnyogi
If you define a select_1 question with non-numeric option values, the reviews are not displayed.
E.g:
import_or_export($ans)
Do you want to import or export the specimens?
---
$ans = select_1
i: import
! The specimens are to be imported.
e: export
! The specimens are to be exported.
In this case, ask_tty will not display the review message. If 'i' and 'e' are substituted for '1' and '2' , the reviews are displayed correctly.
I haven't tested ask_wx or select_n questions which may also be affected.
I understand this one now. It affects select_n as well as select_1, but does not affect ask_wx. It would also affect a select_* question where the tag values are numeric, but not declared contiguously from 1, eg:
---
$ans = select_1
7: First option
! review msg for first option
10: Second option
! review msg for second option
Essentially, the ask_tty module converts alternatives to a numbered list (numbered contiguously from 1) but passes the review iterable through in it's raw form. The reviews therefore do not match unless the tags happen to obey the same convention.
I'll fix this as part of my question rewrite. See http://sourceforge.net/projects/pyke/forums/forum/744446/topic/3945480
This bug was fixed in changeset 05b84cb429e7 which has now been merged into the Mercurial trunk.