|Anonymous | Login||12-06-2021 07:37 UTC|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details [ Jump to Notes ]||[ View Advanced ] [ Issue History ] [ Print ]|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0007299||[Squeak] System||minor||always||02-23-09 21:14||02-23-09 22:49|
|Summary||0007299: Problem encountered in reading help files|
|Description||Following the menu path "World | Help | Preferences | Help!" causes an index error exception. This is because one of the help strings is empty, and Preferences>>giveHelpWithPreferences invokes SequenceableCollections>>last on the empty string. The "last" method is implemented as "^self at: self size", causing the index error when size is zero.|
|Attached Files||giveHelpWithPreferences-jlh-M7299.1.cs.gz [^] (1,425 bytes) 02-23-09 22:36|
(0012983 - 44 - 44 - 44 - 44 - 44 - 44)
|I can verify the error exists in 3.10.2-7179|
(0012984 - 644 - 692 - 692 - 692 - 692 - 692)
This particular preference is rendered as a set of radio buttons and not as a checkbox, as a result through the UI there is no access to help for the overall preference. As such it was logical not to provide help since it is provided for each of the choices. But this breaks the help text generator which assumes that every preference has non-empty help.
So the question is who is in the wrong?
1. An empty help string is not a valid choice.
2. Assuming the help string is not empty is invalid.
I've confirmed that the help strings from the individual choices are not used in generating the help text which is also a deficiency.
(0012985 - 529 - 561 - 561 - 561 - 561 - 561)
|I have submitted a fix in which I edited Preferences>>giveHelpWithPreferences to not call the "last" method on aHelpString if aHelpString is empty. It seemed appropriate that the fix NOT be made in SequenceableCollection>>last, as the only reasonable fix there would be to return something other than the last element of the sequence (e.g., ^self). Since this could lead to the caller having to check the return for appropriateness, it seems better to just leave "last" alone and make the caller responsible for valid parameters.|
|02-23-09 21:14||phramus||New Issue|
|02-23-09 21:14||phramus||Status||new => assigned|
|02-23-09 21:14||phramus||Assigned To||=> KenCausey|
|02-23-09 21:19||phramus||Issue Monitored: phramus|
|02-23-09 21:26||KenCausey||Note Added: 0012983|
|02-23-09 21:26||KenCausey||Assigned To||KenCausey =>|
|02-23-09 21:26||KenCausey||Status||assigned => acknowledged|
|02-23-09 21:26||KenCausey||Category||Any => System|
|02-23-09 21:53||KenCausey||Note Added: 0012984|
|02-23-09 22:36||phramus||File Added: giveHelpWithPreferences-jlh-M7299.1.cs.gz|
|02-23-09 22:49||phramus||Note Added: 0012985|
| Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
49 total queries executed.|
34 unique queries executed.