Index: doc/next-migration.txt =================================================================== diff -u -r89cad338bc3a7ed0b43bde21193886d6a9b8c7b4 -r80f8424525f6c3d14ab4755be446758559f810a3 --- doc/next-migration.txt (.../next-migration.txt) (revision 89cad338bc3a7ed0b43bde21193886d6a9b8c7b4) +++ doc/next-migration.txt (.../next-migration.txt) (revision 80f8424525f6c3d14ab4755be446758559f810a3) @@ -1576,6 +1576,41 @@ ---------------- |====================== +==== Check existence of a method + +NX provides multiple ways of checking, whether a method exists; one +can use +info method exists+ to check, if a given method exists +(return boolean), or one can use +info methods ?pattern?+, where ++pattern+ might be a single method name without wild-card +characters. The method +info methods ?pattern?+ returns a list of +matching names, which might be empty. These different methods appear +appropriate depending on the context. + +[options="header",cols="asciidoc,asciidoc",frame="none",valign="middle"] +|====================== +|XOTcl |Next Scripting Language + +|[source,tcl] +---------------- +/obj\|cls/ info [inst](commands\|procs\|parametercmd) ?pattern? +---------------- +|[source,tcl] +---------------- +/obj/ info method exists /methodName/ +/obj/ info methods /methodName/ +---------------- +|[source,tcl] +---------------- +/obj\|cls/ info [inst](commands\|procs\|parametercmd) ?pattern? +---------------- +|[source,tcl] +---------------- +/cls/ ?class-object? info method exists /methodName/ +/cls/ ?class-object? info methods /methodName/ +---------------- +|====================== + + ==== List callable methods In order to obtain for an object the set of artefacts defined in the @@ -2086,6 +2121,7 @@ ---------------- |====================== + ==== Check properties of object and classes Similar as noted before, NX uses rather a hierarchical approach of