parameters.test

Clone Tools
  • last updated 3 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
nsf.c: - fixed parmeter syntax for required nonpos args - deactivate deletion of methods via nsf::object::delete during shutdown to avoid missing slot forwarders called from destructors

  1. … 5 more files in changeset.
nx.tcl: - rename the following internally called methods (not for XOTcl). alloc -> __alloc dealloc -> __dealloc objectparameter -> __objectparameter recrate -> __recreate - from these methods, only __objectparameter is defined per default, the others are defined on demand

  1. … 6 more files in changeset.
- rename nx::Object.configure to nx::Object.__configure to free method name "configure" for an e.g. tk-like configure

  1. … 5 more files in changeset.
nx.tcl: - set multiplicty for mixins and filters by default from 1..n to 0..n to avoid error messages, when e.g. empty mixin lists are configured. Setting emtpy mixin-lists is strictly speaking not necessary, but this eases the code in cases the lists are sometimes empty.

  1. … 3 more files in changeset.
Adding a test case and a preliminary fix for the parameter option interactions

  1. … 1 more file in changeset.
- library/nx/nx.tcl: Following the code review, implemented a first scheme for handling traces in setCheckedInstVar. This gives us consistent behavior for defaults and traces (valuechangedcmd) across classes and objects. - tests/parameters.test: Adjusted the relevant tests - Pending: setCheckedInstVar currently uses ::nsf::is to validate the value (e.g., default value) to be set. However, it might get passed parameter options which do not fit the NSF_DISALLOWED_ARG_VALUECHECKED filter.

  1. … 1 more file in changeset.
- Addressed a number of issues in the NX slot infrastructure (which revealed themselves when running Mark's BusinessActivities implementation in XOTcl2 mode): - generic/nsf.c: Initcmd blocks (as set for registering per-class slot traces) were subjected to argument checks causing unexpected behavior (e.g., attempts of unboxing initcmds as Tcl lists or of checking initcmds against value types). This was fixed by exempting NSF_ARG_INITCMD params from argument checking in ArgumentCheck() explicitly. - library/nx/nx.tcl: For per-class parameters, the use of valuechangedcmd effectively overruled the default value specified (simply because the generated initcmd holding the trace statements took the place of the default value). While for defaultcmd and for valuecmd the parallel use of default is forbidden, the valuechangedcmd semantics allow for specifying a default, in principle. This was fixed by providing a default-setting statement in the initcmd. - tests/parameters.test: Added tests to cover the above (and beyond). - library/xotcl/library/xotcl2.tcl: Extended the backwards compatibility of the hybrid XOTcl2/NX slots infrastructure to the XOTcl 1 interface: This includes support for inline -proc statements and instvar. This compat level corresponds to the slot interface as documented (by examples) in the XOTcl language ref and the manual. - library/xotcl/tests/slottest.xotcl: Added tests for the above compat enhancements.

  1. … 4 more files in changeset.
The BA examples are operative

  1. … 1 more file in changeset.
Most issues resolved, however, the ordering of default vs. traces is pending

  1. … 4 more files in changeset.
- added a SlotContainerCmdResolver() to avoid interaction of slot names with names of callable tcl commands. Without the SlotContainerCmdResolver() the call to "list" in a property named "list" leads to a call to the container object ::Test2::slot::list instead to the intended ::list. The implementation is not perfect, since it ignores the namespace path inside the slot container. - added regression test.

  1. … 2 more files in changeset.
- start error messages with a lower case word for consistency and to follow closer to Tcl's conventions

  1. … 6 more files in changeset.
- implement escaping for comma in value of parameter options: escaping in values can be achived via duplicating the comma. - extend regression test

  1. … 2 more files in changeset.
- pass property name to slot "initialize" method to conform with the interface to "assign", "get" ... (all these receive the property name as well) - allow slot "initialize" method to be protected (handled similarly to "init")

  1. … 3 more files in changeset.
nsf.c: - added object parameter option "slotinitialize" - renamed object parameter option "invokesetter" -> "slotassign" - call slot.assign instead of setter of object - removed restriction on nosetter/invokesetter: nosetter can be used in connection with slotassign - added regression test for slot.initialize

  1. … 4 more files in changeset.
- treating incompatible forwarding to slot vs. slot option noaccessor - extended regression test

  1. … 2 more files in changeset.
- Forward setting of object parameters to the slot object, when assign method is user-defined on the slot object - Cleanup and extend regression test

  1. … 3 more files in changeset.
- nsf.c: start all error messages with a lower case word for consistency and to follow closer to Tcl's conventions

  1. … 14 more files in changeset.
- generic/nsf.c: DispatchUnknownMethod() In the re-entrant case, the unknown dispatcher was too greedy by skipping the first element in the objv at basically all times. For CallConfigureMethod() case in XOTcl2, the actual method name was so skipped. Generally speaking, the "skipping rules" in DispatchUnknownMethod() feel a touch too particular to me: For instance, the dispatch flag "-local", "-system" etc. must be handled. Also, unknowns in method ensembles have the unknown method listed first in objv. Alternatively, we might review how objc/objv make it into DispatchUnknownMethod() (there are just two call sites). But this would merely shift/spread the skipping. Changing the arg vectors, to begin with, (e.g. removing "-local", "-system", etc. from the objv) would requiring rebuilding the arg vector. - tests/parameters.test: Added a simplistic test case to catch the error reporting for XOTcl 2's residualargs handling.

  1. … 1 more file in changeset.
- make sure to use "XOTcl 2.0" instead of just XOTcl in "package req" to avoid confusions due to beta state - remove more obsolete and untested files

  1. … 56 more files in changeset.
- rename "info method handle /methodName/" into "info method registrationhandle /methodName/" - rename "info method origin /methodName/" into "info method definitionhandle /methodName/" - added "info method origin" to return the target of an alias (or empty)

  1. … 19 more files in changeset.
- altered default handling to honor side effects of aliased object parameters. This slows down evaluation a little. Side-effects from aliased parameters are discouraged, since the order of the evaluation should not matter of an declarative evaluation of the argument vector. - extended regression test

  1. … 2 more files in changeset.
nonleadingdash handling: - doc: added "nonleadingdash" to UML class diagramm - nsf.c: added error message, when "noleadingdash" is used on non-positional parameters - nsf.c: use same logic for "nonleadingdash" to "value in argument" - nsf.c: deactivated rudimentary unknown handler for the time being - nx.tcl: added handling of parameter option "noleadingdash" in objectParameterSlots

  1. … 6 more files in changeset.
tests: - added "package prefer latest" to avoid confusions of alpha and beta releases with install versions

  1. … 12 more files in changeset.
- nsf.c - added experimental parameter option noleadingdash - additionalal regression test file method-parameter.test - provide selective error messages for unknown nonpos args

  1. … 11 more files in changeset.
- remove "namespace import ::nx::*"

- nx.tcl: moved "properties" from nx::Class to nx::Object

  1. … 3 more files in changeset.
- use colon cmd rather then my

- nx: * added namespace "nx::internal" * delete procs via "rename to emtpy" instead of "defining procs with empty argumentes and body" * provided "-properties" as a replacement for -attributes, but without magic variable * extended regression test

  1. … 4 more files in changeset.
- minor optimizations

  1. … 2 more files in changeset.
- renamed "nsf::method::dispatch" to "nsf::directdispatch" - renamed "nsf::object::dispatch" to "nsf::dispatch"

  1. … 16 more files in changeset.