April White wrote:

I've uploaded to http://www.scintilla.org/aprilw/scite-april-2006-03-02.zip those revisions based on Neil's last email.

  The CmdQueue code looks like an abandoned experiment as it doesn't
appear to be linked in.

I was planning on renaming the Job* system to Command* but reversed this and forgot about these files. I've removed them from my HD.

Methods shouldn't end with ';' after the '}'.

Found and fixed

  A warning from Borland (line number may differ from your version)
Warning W8004 .\SciTEWin.cxx 817: 'cancelled' is assigned a value that
is never used in function SciTEWin::ExecuteOne(const Job &,bool &)

Found and removed.


  I don't much like specifying all the string modes explicitly like
("savebefore", "savebefore:1", "savebefore:yes", "savebefore:2", and
"savebefore:no"). Shouldn't this be broken up into recognition of the
mode name and the value as it was previously? This is a good example
of not following "don't repeat yourself" with the chance of failing to
spell all instances the same or only updating some when making a
change.

I am of the opposite opinion. If the flags were only 0/1 then there would be nothing gained by my implementation, but there are currently 2 switches that have three options. A solution that does not use the form I wrote would have to be specifically programmed for these variations, whereas my implementation is merely a simple for..next loop.

... New switches could be programmed by merely adding lines of the same form, and would not require special programming to handle.

This is a abbreviated reprint of Neil's comment and my reply. I know this will be of little interest to those who do program the internals of SciTE, for those that do what say you?

The array approach has many duplicate entries, one for each possible mode and value, but there is no processing needed aside from a for..next loop and some assignments. To do away with the array removes the duplicates but necessitates adding special code for those modes that have more than a no/yes choice.

April

--
Santa Claus has the right idea. Visit people only once a year.
- Victor Borge

_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest

Reply via email to