Philippe Lhoste wrote:
Robert Roessler wrote:
BTW, it sure would be nice if Scintilla itself could parse the
properties file entries... :)
Which format? SciTE one? Lua table? Separated by coma, tabs,
semi-colons, line-feed, NULL?
We should not put rigid format in Scintilla if avoidable.
Well, since you mention it, SciTE does have a file format already
defined which is able to represent all of the needed style control
information in a concise and easy-to-use way. :)
And seriously, is there any reason why Scintilla couldn't just be told
the name of a properties file (possibly as an additional param to
the above calls), and then follow its usual directory search order and
load the thing itself?
Two reasons:
- The one invoqued above: Scintilla isn't SciTE, and should not be bound
to its file formats.
- Scintilla has avoided so far to do any file operation, which is a good
thing I think: it reduces the coupling with OS, improves the
portability, and it allows more flexibility in the file formats.
To both of these points: yes, they are great theoretical (and even
sometimes practical) stances to take... but in the real world, anyone
using Scintilla is forced to either adopt an existing format from
elsewhere (or make [yet another] one up) and implement it.
Do any of us really need another properties file format? Do any of us
really want to implement this type of code again?
The reason that I wrote the [simple] SCI_GETPROPERTY* Scintilla API
entries is so anyone who is concerned about actually just getting a
simple Scintilla-using project out would have the *option* of using a
simple and proven "mini" properties DB - they are not *required* to do
so if it does not meet their needs.
A (to me, of course) reasonable compromise here would be to add an API
function which, when passed a style# and a string in the format of a
SciTE [right-hand-side] properties file value, would interpret it in
the context of the currently set lexer AND whatever properties are
already set, and make the indicated style definition calls (note that
I am not suggesting implementing the left-hand-side (key) semantics).
Nobody would be forced to use this, but anyone who has the need to
represent style-definition information similar to that of SciTE,
*could* use a ready-made solution... SciTE itself would be able to
take advantage of this facility! :)
Robert Roessler
[EMAIL PROTECTED]
http://www.rftp.com
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest