- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::nx::Class
::nx::Class create ...
Class Relations
::nx::Class create ::nx::Class \ -superclass ::nx::ObjectMethods (to be applied on instances)
alias (scripted)
set pathData [:__resolve_method_path $methodName] set object [dict get $pathData object] #puts "class alias $object.[dict get $pathData methodName] $cmd" set r [::nsf::method::alias $object [dict get $pathData methodName] -frame $frame $cmd] ::nsf::method::property $object $r call-protected [::nsf::dispatch $object __default_method_call_protection] if {[info exists returns]} {::nsf::method::property $object $r returns $returns} if {$debug} {::nsf::method::property $object $r debug true} if {$deprecated} {::nsf::method::property $object $r deprecated true} return $rcreate (alias)
delete method (scripted)
::nsf::method::delete [self] $namedelete property (scripted)
set slot [:info slots $name] if {$slot eq ""} { return -code error "[self]: cannot delete property '$name'" } $slot destroydelete variable (scripted)
set slot [:info slots $name] if {$slot eq ""} { return -code error "[self]: cannot delete variable '$name'" } $slot destroyfilters (forward)
forward (scripted)
set pathData [:__resolve_method_path $methodName] set arguments [lrange [::nsf::current args] 1 end] set object [dict get $pathData object] if {[info exists target] && [string index $target 0] eq "-"} { error "target '$target' must not start with a dash" } if {[info exists frame] && $frame ni {object default}} { error "value of parameter -frame must be 'object' or 'default'" } if {[info exists returns]} { set nrPreArgs [expr {[llength $arguments]-[llength $args]}] # search for "-returns" in the arguments before $args and remove it set p [lsearch -exact [lrange $arguments 0 $nrPreArgs] -returns] if {$p > -1} {set arguments [lreplace $arguments $p $p+1]} } set r [::nsf::method::forward $object [dict get $pathData methodName] {*}$arguments] ::nsf::method::property $object $r call-protected [::nsf::dispatch $object __default_method_call_protection] if {[info exists returns]} {::nsf::method::property $object $r returns $returns} if {$debug} {::nsf::method::property $object $r debug true} if {$deprecated} {::nsf::method::property $object $r deprecated true} return $rinfo filters (alias)
info heritage (alias)
info info (scripted)
::nx::internal::infoOptions -asList=$asList ::nx::Class::slot::__info [next {info -asList}]info instances (alias)
info method args (scripted)
: ::nsf::methods::class::info::method args $name
info method body (scripted)
: ::nsf::methods::class::info::method body $name
info method callprotection (scripted)
if {[::nsf::method::property [self] $name call-protected]} { return protected } elseif {[::nsf::method::property [self] $name call-private]} { return private } else { return public }info method debug (scripted)
::nsf::method::property [self] $name debuginfo method definition (scripted)
: ::nsf::methods::class::info::method definition $name
info method definitionhandle (scripted)
: ::nsf::methods::class::info::method definitionhandle $name
info method deprecated (scripted)
::nsf::method::property [self] $name deprecatedinfo method exists (scripted)
: ::nsf::methods::class::info::method exists $name
info method handle (scripted)
: ::nsf::methods::class::info::method definitionhandle $name
info method origin (scripted)
: ::nsf::methods::class::info::method origin $name
info method parameters (scripted)
set defs [: ::nsf::methods::class::info::method parameter $name] if {[info exists pattern]} {return [::nsf::parameter::filter $defs $pattern]} return $defsinfo method registrationhandle (scripted)
: ::nsf::methods::class::info::method registrationhandle $name
info method returns (scripted)
: ::nsf::methods::class::info::method returns $name
info method submethods (scripted)
: ::nsf::methods::class::info::method submethods $name
info method syntax (scripted)
return [string trimright "/cls/ [namespace tail $name] [: ::nsf::methods::class::info::method syntax $name]" { }]info method type (scripted)
: ::nsf::methods::class::info::method type $name
info methods (alias)
info mixinof (alias)
info mixins (alias)
info slots (scripted)
set cmd [list ::nsf::methods::class::info::slotobjects -type $type] if {[info exists source]} {lappend cmd -source $source} if {$closure} {lappend cmd -closure} if {[info exists pattern]} {lappend cmd $pattern} return [: {*}$cmd]info subclasses (alias)
info superclasses (alias)
info variables (scripted)
set cmd {info slots -type ::nx::VariableSlot} if {[info exists pattern]} {lappend cmd $pattern} return [: {*}$cmd]method (scripted)
set p [:__resolve_method_path $name] set p [dict filter $p script {k v} {expr {$k in {object regObject methodName}}}] dict with p { #puts "class method $object.$methodName [list $arguments] {...}" set r [::nsf::method::create $object -checkalways=$checkalways {*}[expr {$regObject ne "" ? "-reg-object [list $regObject]" : ""}] $methodName $arguments $body] if {$r ne ""} { # the method was not deleted ::nsf::method::property $object $r call-protected [::nsf::dispatch $object __default_method_call_protection] if {[info exists returns]} {::nsf::method::property $object $r returns $returns} if {$debug} {::nsf::method::property $object $r debug true} if {$deprecated} {::nsf::method::property $object $r deprecated true} } return $r }mixins (forward)
new (alias)
property (scripted)
if {$accessor eq ""} { set accessor [::nsf::dispatch [self] __default_accessor] } set traceSpec [expr {[info exists trace] ? [list -trace $trace] : ""}] set r [[self] ::nsf::classes::nx::Class::variable -accessor $accessor -incremental=$incremental -class $class -configurable $configurable -initblock $initblock {*}$traceSpec {*}$spec] return $rrequire method (scripted)
return [::nsf::method::require [::nsf::self] $methodName 0]require private method (scripted)
set result [:require method $methodName] ::nsf::method::property [self] $result call-private true return $resultrequire protected method (scripted)
set result [:require method $methodName] ::nsf::method::property [self] $result call-protected true return $resultrequire public method (scripted)
set result [:require method $methodName] ::nsf::method::property [self] $result call-protected false return $resultvariable (scripted)
set defaultopts [list -accessor $accessor -configurable $configurable] if {[info exists trace]} { foreach t $trace { if {$t ni {none get set default}} { return -code error "invalid value '$t' for trace: '$trace'" } } lappend defaultopts -trace $trace } lassign [::nx::MetaSlot parseParameterSpec -class $class -target [self] $spec] pname parameterOptions _ options if {[info exists defaultValue] && [dict exists $options -substdefault] && [string match {*\[*\]*} $defaultValue] && ![info complete $defaultValue] } { return -code error "substdefault: default '$defaultValue' is not a complete script" } set slot [::nx::MetaSlot createFromParameterSpec [::nsf::self] -class $class -initblock $initblock -incremental=$incremental -private=[expr {$accessor eq "private"}] -defaultopts $defaultopts $spec {*}[expr {[info exists defaultValue] ? [list $defaultValue] : ""}]] if {[$slot eval {info exists :settername}]} { set name [$slot cget -settername] } else { set name [$slot cget -name] } #puts stderr handle=[::nsf::directdispatch [self] ::nsf::methods::class::info::method registrationhandle $name] return [::nsf::directdispatch [self] ::nsf::methods::class::info::method registrationhandle $name]
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables