[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [StrongED] RFC; Changing the choices system

In message <mpro.nd0e2z008yvhd0vpd.pittdj@xxxxxxxxxxxx>
          David Pitt <pittdj@xxxxxxxxxxxx> wrote:

> Fred Graute, on 5 Oct, wrote:
> > In message <mpro.ncv8360013sm10tgs.pittdj@xxxxxxxxxxxx>
> >           David Pitt <pittdj@xxxxxxxxxxxx> wrote:
> [snip]
> > > I am not too sure, as yet, about the 'Text' or 'View' distinction.
> >
> > There are options that cannot be set at 'View' level (things like newline
> > type, tab insertion, hardwrap) because if they could then the result of
> > editing would depend on which view you used. I use multiple views on the
> > same text regularly, eg in Dump mode one view in Asm mode the other in
> > Ascii or byte mode.
> I think I'm getting there.
>    +----------------------------------+
>    | Mode                             |
>    |                                  |
>    |   +--------------------------+   |
>    |   | Text/File                |   |
>    |   |                          |   |
>    |   |   +-------+  +-------+   |   |
>    |   |   |View1  |  |View2  |   |   |
>    |   |   |       |  |       |   |   |
>    |   |   |       |  |       |   |   |
>    |   |   |       |  |       |   |   |
>    |   |   |       |  |       |   |   |
>    |   |   +-------+  +-------+   |   |
>    |   |                          |   |
>    |   |                          |   |
>    |   +--------------------------+   |
>    |                                  |
>    |                                  |
>    +----------------------------------+

With the comments provided in this thread in mind I've been exploring
ways of simplifying the scope system without losing too much of the
flexibility that was in the original proposal. Here's what I came up
with (this is still based on the same model as drawn by David above):

Originally we had these options for which settings to apply and at what
level to apply them:

  Apply changed view settings to this view
        all     text             this text
                mode             this mode
                                 all views
                                 all texts
                                 all modes

The distinction between All / Changed settings is dropped. If it's
unchanged there's no point in applying it. The type of settings to be
applied (Mode/Text/View) is removed and the scopes are reduced so that
we're left with this:

  Apply changed settings to this view
                            this text
                            this mode
                            all modes

When the scope is 'this view' then the settings for this view, even when
modified using the Infobar, will be shown. Any changes made will only be
applied to the view from which the choices window was opened.

When scope is 'this text', the text and view settings for the text are
shown. Changes made will be applied to the text and all its views.

When scope is 'this mode', the mode, text and view settings for the mode
are shown. Changes made will be applied to all texts and views that use
this mode.

To make this work consistently the following would need to be achieved:

When a new text is created it inherits the text and view settings from
the mode settings. The view created on this text will inherit the view
settings from the text. (does make things a bit more complicated [1])

Problem is that ATM some settings are not stored at text level, only at
view and mode level, eg wrapwidth. Other settings are only stored at
mode level such as font settings, syntax colours.

Easily modified but it requires decisions to be made about which scope
each setting should have. For some this is immediately clear but for
others not so, eg where to put spell checking?

It's also not entirely clear to me if there's anything that will prevent
this from working. Can the font be set at view level or will this upset
something? Are there any other show-stoppers?

As you can see there's still lots of things to consider but I feel that
doing it this way will give us a choices system that's consistent, not
too complicated and with a reasonable amount of flexibility.

Over to all of you, any and all feedback is most welcome!

[1] Lets say the mode's wrapwidth is set at '80' so any new text and
view also have '80' as their wrapwidth.

The wrapwidth for the text, and hence the view, is changed to '96'. Then
a new view on this text is created and using the Infobar the wrapwidth
is changed to '132'.

Which wrapwidth we now see in the Mode Choices depends on the scope and
view used. If scope is 'this view' we'll see '96' or '132' depending on
which view was used. With 'this text' as scope we'll see '96' as that's
what it's set at text level. Finally, 'this mode' will show the setting
at mode level which is '80'.


StrongED Developer

To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxxxxx
List archives at http://www.Torrens.org.uk/RO/StrongED/index.html