Nested numeric lists that include number of parent list item

Trevor DeVore lists at mangomultimedia.com
Tue Feb 11 23:11:50 EST 2020


On Tue, Feb 11, 2020 at 7:11 PM Niggemann, Bernd via use-livecode <
use-livecode at lists.runrev.com> wrote:

> I am not aware that listStyle decimal can show other then 1. No further
> sub numbering.
>
> However one could hack it. Although I know you are not particularly fond
> of those hacks...
>
> The code assumes that the listStyle of a field is set (any) will be "skip"
> afterwards and list depth is also set.
>

Thanks for the suggestion Bernd. I appreciate you taking the time. You are
right though, I'm not particularly fond of hacks in the field control when
the field is being used as a text editor (which is my use case).

Here is the reason why. When writing a text editor it doesn't take long for
the hacks to get out of hand and you end up with a control that becomes
hard to add features to and hard to perform maintenance on. In addition,
the field stops behaving or looking the way a user expects a text editor to
work. For example, if I were to add the hack for displaying nested numeric
lists I would need to add a hack for keeping track of other list styles the
user might select elsewhere in the field. I would also have to deal with
incorrect indentation for multi-line list items because the text would
appear flush with the list numbers. Then I would need to add a hack to
handle deletion of characters properly since the numbers are part of the
actual text rather than an ornament that is added by the engine. There is
this ripple effect which always makes me wish I hadn't implemented the hack
:-)

-- 
Trevor DeVore
ScreenSteps
www.screensteps.com



More information about the use-livecode mailing list