Josh Phillips wrote:

My trouble with the current implementation of the properties file is understanding the code that creates them. perhaps its my inexperience but it seems to be pretty complex, and the way SciTE uses them for preferences/settings is, to me, pretty unintuitive.

Maybe I'll look more into how properties are handled, but my first looks at them left me pretty lost.

My take on the Scintilla "properties" functionality is that it is fairly simple - just read the ScintillaDoc.html entries on SCI_SETPROPERTY and SCI_GETPROPERTY*. Straightforward and not very trick.

OTOH (I trust Neil will set me straight if I get this too far wrong), SciTE's usage of the properties system gets a lot trickier, particularly as regards setting them (using "funny" keys)... but you do not need to let that stuff scare you off if you just want a simple way of setting and retrieving key-value pairs. :)

Simple persistence is... simple. On the input side, just read a set of key-value pairs, one per line, separated by "=" and do a SCI_SETPROPERTY call. For output, just do SCI_GETPROPERTY calls for each of the key-value pairs you want to persist, and write them in the format expected by the input side.

Robert Roessler
[EMAIL PROTECTED]
http://www.rftp.com
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to