method-require.test

Clone Tools
  • last updated 17 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
- nx.tcl: * added protected and public for "require method" The following forms are now valid "... require public method" "... require protected method" "... require method" "... require public class method" "... require protected class method" "... require class method" * extended regression test

  1. … 3 more files in changeset.
- regularized more nsf::* names: renamed "nsf::createobjectsystem" => "nsf::objectsystem::create" renamed "nsf::unknown" => "nsf::object::unknown" renamed "nsf::dispatch" => "nsf::object::dispatch"

  1. … 17 more files in changeset.
- provided nicer registration and inspection interface for unknown handlers - added documentation for unknown handlers in tutorial - cleanup of __unknown

  1. … 8 more files in changeset.
- Use mixinregObjType as well in NsfRelationCmd(), so this is the only place, where mixin and guards are processed. - Since the type converter converts Tcl-Objs, we have less context information (e.g. we have no base class, on which we can decide to call e.g. __unknown on on of the objects systems). - because of the point above, i removed ::xotcl::Class->__unknown and ::nx::Class->__unknown in favor of a global proc ::nsf::unknown, for which unknown handlers can be registered - GetClassFromObj() receives as last argument "withUnknown" instead of baseClass to indicate, when unknown should be tried. - new function NsfCallUnkownHandler()

  1. … 9 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.
- nsf.c: made potentially unknown clientData more safe (error message, when something is passed via clientData to a method expecting an object/class as clientData). - renamed NsfNoDispatchObjectError() to NsfDispatchClientDataError(), extended interface - Makefile.in: fixed name methods.test

  1. … 8 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: * removed methods ::nx::Class.alloc and ::nx::Class.dealloc from predefined method-set

* added defintions such that these methods can be loaded via

::nsf::method::require ::nx::Class alloc

::nsf::method::require ::nx::Class dealloc

* make explicit that "method ... require" returns a method-handle

* removed misleading reference in error message, when a class-spefic

method was called on an object; solution is somewhat dangerous for

potentially unknwon client data

* added regression tests

  1. … 9 more files in changeset.
- changed named of method handling commands in nsf: ::nsf::provide_method => ::nsf::method::provide ::nsf::require_method => ::nsf::method::require

  1. … 6 more files in changeset.
- changed named of method handling commands in nsf: ::nsf::methodproperty => ::nsf::method::property ::nsf::method => ::nsf::method::create ::nsf::methoddelete => ::nsf::method::delete ::nsf::alias => ::nsf::method::alias ::nsf::forward => ::nsf::method::forward ::nsf::setter => ::nsf::method::setter (updated regression test, docs, ...)

  1. … 24 more files in changeset.
- Make sure that DispatchDestroyMethod() calls as well protected destructors - New function NSCheckNamespace() as replacement for NSCheckForParent() - pass parentNsPtr around instead of recomputing it in NSCheckForParent() - removed unneeded argument from NSGetFreshNamespace() - switched to dstring operations in NameInNamespaceObj() (seems slightly faster) - factored out NSRequireParentObject() - by the measures above, we obtained some speed improvements - moved some more debug output to be controlled by the debuglevel - extended regression test with testcases for creation of parent objects via method "__unknown"

  1. … 3 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
    • +59
    ./method-require.test
  1. … 35 more files in changeset.