While experimenting with the .Properties class:
* the lines ignored by the .Properties class need to be either empty or be
led-in by an ooRexx
line comment "--"
o the semi-colon char ";" is usually the standard line comment for
property/config files in
most other systems, but the .Properties class takes it and the
following text as the name of
a property
o shouldn't ';' be treated as a comment due to its usage as a line
comment in text files?
* a definition is of the form "name=value"
o surrounding blanks are removed from "name" as in Rexx leading and
trailing blanks are ignored
o sourrounding blanks remain in "value", which is a surprise for Rexx
programmers
+ if leading and trailing blanks are significant, then one is always
able to enclose the
text in quotes
+ shouldn't the "value" part be stripped of leading and trailing
blanks as is done for the
"name" part?
* comments get ignored
o wouldn't it be helpful, if a name=value entry would allow for
maintaining any comments being
given immediately of the "name=value" pair? E.g. a property file
"test.config"
-- this is a comment for the next name=value pair
testName = testValue
Then, e.g.
props=.Properties~load("test.config")
say "comment for 'testName':" props~comment('testName')
props~comment('testName')='This is a new comment.'
props~save('test.config')
* there are no sections that one can define currently: there are
configuration files that organize
their name=value entries in sections, where usually a section is a name
enclosed in square
brackets, e.g. "[printing options]"
o it would be nice to have sections and then get and put key=name values
from there/to it; if
a section is preceded by a comment, than it will be assigned to the
section
o if saving such a .Properties object the sections could/should be
written as well
o would that be a feature useful for others as well?
Just checking out via the developer list first, whether others would find
extensions to the
.Properties class useful before creating a feature request.
---rony
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel