forward.test

Clone Tools
  • last updated 5 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
- tests/forward.test, tests/methods.test: Remove some intermediary statements

  1. … 1 more file in changeset.
- nsfStack.c / CallStackMethodPath(): Providing a fix for reporting method paths correctly when dispatching to ensembles from alias parameters. Prior to that fix, the intermediate (and inactive) CMETHOD frame wrapping configure() calls caused [current methodpath]s to report empty string elements. Added some test cases. - nsf.c / ObjectDispatch(), DispatchUnknownMethod(): When testing objects as alias parameter targets, I found cases when the default (C-level) unknown handler was invoked upon. The result was an unknown message which reported the delegator object as "unknown" method! This was due to injecting the delegator object into the argument vector at position 0, subsequently used by the C-level unknown handler. First, I tried to make the C-level unknown handler aware of the ensemble call context (by funneling through the CSC and frame flags) but this turned out to be complicated to achieve this simple task. As an alternative, I suggest the following patch: The first argument in unknown calls is treated as a list, and dependening on the call context (ensemble vs. non-ensemble) contains all the necessary call data. For ensemble methods, it is the delegator object, the entire method path (as returned by [current methodpath]), and the actual unknown selector. The default C-level handler, treating the call info as list, resorts to reporting the last element of the list which is always the unknown selector. Custom (ensemble-level, application-level) unknown handler can wrap and further process the information as necessary. To demonstrate the usefulness, I rewrote EnsembleObject->unknown() accordingly. I checked for Tcl_Obj leaks. - Added some tests on objects as targets of alias object parameter. To be continued.

  1. … 6 more files in changeset.
- test.tcl: * don't export Test per-default * define Test as nx::Test * make Test parameter count 1 the default, change to higher numbers where needed

  1. … 15 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.
- nx.tcl: cleanup of forward implementation

  1. … 1 more file in changeset.
- changed relation handling by evaluating the relationcmd in the parent context to keep evaluation order. - extend introspection "nsf::configure objectsystem": the command returns now all system methods in the syntax of nsf::createobjectsystem - "nsf::createobjectsystem" creates now a warning when an existing objectsystem is redefined and ignores the new definition attempt. This was done with the purpose to allow "package forget nx; package require nx" - Allow overwriting of redefine protected method during bootstrap to ease "package forget nx; package require nx" - forward had just "-objscope", no general "-frame method|object". Since forwarder have client data, they always push a method frame. So, the situation is different to nsd::alias and ::nsf::dispatch. Therefore, the flag "-objscope" was renamed to "-objectframe" to provide better consistency with "-frame object" - fixed bug, where error handling of invalid options in ForwardProcessOptions() could lead to a crash - return forwardoption "-earlybinding" via instrospection - extended regression test

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

  1. … 35 more files in changeset.