Property Reform Part 2: better handling of per-object properties nsf.c: - changed "/class/ __objectconfigure" to "/obj/ __objectconfigure" to be able to handle per-object properties on classes properly. - renamed "info method parametersyntax" -> "info method syntax" - renamed "/obj|cls/ info method parametersyntax" into "/obj|cls/ info method syntax" - replaced "::nsf::methods::class::info::objectparameter" by "::nsf::methods::object::info::objectparameter" - new command "::nsf::parameter::specs ?-configure? ?-noposargs? slotobjs": convert provided slotobjs into a list of parameter specs - new command "::nsf::parameter::get list|name|syntax parameterspec": convert parameter spec into syntax form, or retrieve pieces of information from it (can be extended in the future) - added more or less generic list handling functions TclObjListFreeList(), TclObjListNewElement() and TclObjListAdd() used by "::nsf::parameter::specs" - replaced "::nsf::method::property /obj/ -per-object /name/ slotcontainer ?value?" by "::nsf::object::property /obj/ slotcontainer ?value?" - added "::nsf::object::property /obj/ hasperobjectslots ?value?" nx.tcl: - new info methods * "/obj/ info lookup parameter definitions" * "/obj/ info lookup parameter names" * "/obj/ info lookup parameter list" * "/obj/ info lookup parameter syntax" - changed "/cls/ info parameter definition ?name?" into "/cls/ info parameter definitions ?name?" since ir returns a list. Still, "list" or "syntax" won't be plural
Property reform part 1: - disallow protection modifiers for "properties" and add new flag "-accessor" to "property" and "variable" This changes definitions like Class create C { :property {a a1} :public property {b b1} :protected property {c c1} :private property {d d1} } to Class create C { :property {a a1} :property -accessor public {b b1} :property -accessor protected {c c1} :property -accessor private {d d1} } since "properties" are always public accessible over the "configure" and "cget" interface, but the accessors methods might not be public. The value of the accessor might be also "none" (specifying explicitely that no accessor is wanted) or "", which means: use the default. Same holds for "variable"
- disallow parameter option "incremental" and change it to a flag of the property or variable. The motivation for this is due to the fact, that "incremental" is a property of the accessor, and not of the value.
old: Class create C { :property foo:int,incremental :variable bar:int,incremental }
new: Class create C { :property -incremental foo:int :variable -incremental bar:int }
- disallow "public class property" and friends since these are not needed - removed parameter property "noaccessor"
- removed "nx::configure defaultPropertyCallProtection" and method hook "__default_property_call_protection"
- introduced "nx::configure defaultAccessor" and method hook "__default_accessor"
- for the time being, "defaultAccessor" is "public" for NX and XOTcl, will be changed to "none" in NX
- extended regression test (new file properties.test)