interceptor-slot.test

Clone Tools
  • last updated 12 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
- enforce using "set" for filter/object-filter in slot operations (same as for mixins)

  1. … 10 more files in changeset.
nx.tcl: - add "set" as a method name for relation slots - implemented relation slot "mixin" and "object-mixin" via "slotassign" to disallow "/obj/ mixin /value/" and "/obj/ object mixin /value/" to use instead "/obj/ mixin set /value/" and "/obj/ object mixin set /value/" while keeping "configure" and "cget" working. This has the advantage that "/obj/ mixin set" does not try to replace the mixin chain by "set" - adapted regression test - TODO: check, if we need the explicit "slotassign"? isn't the presence of the slotObj sufficient? maybe "-forwardToSlot" in relationSlots? - TODO: demangle "slotassign" in "ObjectParameterSlot protected method getParameterOptions" and check interactions - TODO: to the same as -mixin and -object-mixin to -filter and -object-filter - TODO: clean up relation slot mixin variants - TODO: do we really like the fact that we have to write now "B mixin set M2" instead of "B mixin M2"? - TODO: should we disallow "B mixin" and enforce instead of "B mixin get" ? - TODO: we could as well allow "B mixin clear" instead of "B mixin set {}" - TODO: allow "set" for variable slots as well. Do we need "assign"?

  1. … 14 more files in changeset.
nsf.c: - change name of enumeratorConverterEntry to Nsf_EnumeratorConverterEntry, move it with NSF_ARG_* flags to tcl.h to make it available in derived modules using the converter - Added editor hints for a more uniform appearance

  1. … 44 more files in changeset.
nx::test: - change test cases to newer interface - don't use "namespace import nx::*" in test cases when not required

  1. … 34 more files in changeset.
Object-method Reform: - changed interface to object specific commands by requiring an ensemble named "object". The rational behind is essentially to use always the same info command to retrieve object specific methods, no matter whether these are defined on a plain object or an a class object (does not break the "contract" what e.g. "info method" returns).

Now we define methods via:

/cls/ method foo {args} {...body...}

/cls/ object method foo {args} {...body...}

/obj/ object method foo {args} {...body...}

Similarly, aliases, forwards and mixins are defined, e.g.

/cls/ mixin add ...

/cls/ object mixin add ...

/obj/ object mixin add ...

/obj/ require object method ...

The same change propagated as well to the "info" method.

Now we have:

/cls/ info methods ...

/cls/ info object methods ...

/obj/ info object methods ...

Similar, the object parametererization uses

/cls/ create obj -object-mixin M

/cls/ create obj -object-filter f

/metacls/ create cls -mixin M1 -object-mixin M2

/metacls/ create cls -filter f1 -object-filter f2

- as a consequence,

a) "/cls/ class method ...",

"/cls/ class alias ...",

"/cls/ class forward ...",

"/cls/ class filter ...",

"/cls/ class mixin ...",

"/cls/ class info ..."

"/obj/ class method require method ..."

"/obj/ class method require public method ..."

"/obj/ class method require protected method ..."

"/obj/ class method require private method ..."

were dropped

b) "/obj/ method ....",

"/obj/ alias ....",

"/obj/ forward ...."

"/obj/ filter ...."

"/obj/ mixin ...."

"/obj/ info method*"

"/cls/ create obj -mixin M"

"/cls/ create obj -filter f"

"/obj/ method require method ..."

"/obj/ method require public method ..."

"/obj/ method require protected method ..."

"/obj/ method require private method ..."

were dropped

- added package nx::class to allow optionally the "class" notation

"/cls/ class method ..." (and friends, see (a)), and

"/cls/ class info ...

- added package nx::plain-object-method to allow optionally plain method

b) "/obj/ method ...." (and friends, see (b))

- add support to slots to use ensemble methods as setters

  1. … 43 more files in changeset.
- Replaced errorneous check using the object-specific rather than the class-specific options in the query mode of ::nsf::relation with class-filter. This prevented [::nsf::relation /cls/ class-filter] from returning any filter info. As a consequence, the incremental interface of the filter slot failed (e.g., [/cls/ filter add aFilterProc] effectively reset the class-filter cmd list instead of adding to it). Thx are due to Markus Moldaschl for reporting the issue. - Aligning class-filter and object-filter behaviour on errors during filter additions to the state-preserving behaviour of object-mixin and class-mixin. - Adding basic tests on object-filter/class-filter (::nsf::relation, filter slot interface) and specific ones to cover the above issues.

  1. … 2 more files in changeset.
Adding basic tests on object-filter/class-filter; and specific ones to cover the class-filter issue

  1. … 1 more file in changeset.
- fix typos - extend regression test to improve coverage

  1. … 1 more file 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.
- renamed "nsf::method::dispatch" to "nsf::directdispatch" - renamed "nsf::object::dispatch" to "nsf::dispatch"

  1. … 16 more files in changeset.
- nsf.c: experimental implementation of ::nsf::method::dispatch

  1. … 8 more files in changeset.
* removed "-local", "-system" and "-intrinsic" from plain dispatch (like e.g. "o1 -system method") * removed flag "-local" from nsf::object::dispatch

  1. … 5 more files in changeset.
- nsf.c: * added "/obj/ -intrinsic ..." similar to "/obj/ -system ..." * added "nsf::my /obj/ -intrinsic ..." similar to "/obj/ -intrinsic ..." * added "nsf::object::dispatch /obj/ -intrinsic ..." similar to "/obj/ -intrinsic ..." * extended regression test

  1. … 4 more files in changeset.
- nsf.c: * integrated "-local" and fully qualified handling with ObjectDispatch to ensure proper behavior of mixins/next etc. * added "/obj/ -local ..." similar to "/obj/ -system ..." * added "nsf::object::disapatch /obj/ -local ..." similar to "/obj/ -local ..." * extended regression test (next from -local, fully qualified names, private methods, "...dispatch -local")

  1. … 8 more files in changeset.
- documenting current behavior * test method-handle + next + dispatch (unwanted) * test "my -local" vs my + method handle * test "my -local" vs dispatch + method handle

  1. … 2 more files in changeset.
- nsf.c: * fixed next path computation in cases where command handles are used to refer to methods in the current mixin order. * extended regression test

  1. … 2 more files in changeset.
- moved mixin reg type converter to a new file (nsfObj.c) - added NsfFilterregObjType, to provide a converter for filter registration similar to mixin registrations - replaced dummy dupIntRepProc and updateStringProc in nsfObj.c by NULL

  1. … 7 more files in changeset.
* Hopefully the last big naming change: Instead of writing "C class-object method foo {} {...}" one can write now "C class method foo {} {...}" to define a class method named "foo" for class "C". This naming change became possible by defining XOTcl's "class" (and "superclass") as object parameter only. To change a class of an object o, one has to use "o configure -class NEWCLASS". The term "object-class" looks alien to language beginners, the term "class" is much more straightforward. Changing classes or superclasses is seldomly used by typicall application programs.

For already existing nx scripts, changing "object-class" into

class should be straightforward.

* various documentation updates (migration guide, nx tutorial)

  1. … 22 more files in changeset.
* provided a fast path implementation for "defaultmethod" * provided default system methods for "init", "defaultmethod" and "unknown" * provided handles for system methods "alloc", "dealloc", "recreate", and "defaultmethod" * strip in dispatch invocations of "unknown" potental leading colons * removed c-level implementation of init again, since scripted one can be used now as well in registration of createobjectsystem * reduced verbosity * added defintions such that these methods can be loaded via ::nsf::method::require ::nx::Object unknown

  1. … 6 more files in changeset.
- added deletion functionality to nsf::mixin - moved handling of methodNames of c-cmds to ResolveMethodName() - extended regression test

  1. … 5 more files in changeset.
- fixed langauge hooks for emacs

  1. … 12 more files in changeset.
- renamed nx regression tests .test to follow tcl conventions

    • -0
    • +185
    ./interceptor-slot.test
  1. … 35 more files in changeset.