Index: library/nx/nx.tcl =================================================================== diff -u -ra7ce0b3aea87386d8baa3c61fa7f4358d5ec3a5e -rfa93101c8752ada9299561f075b61c2e6144e3f5 --- library/nx/nx.tcl (.../nx.tcl) (revision a7ce0b3aea87386d8baa3c61fa7f4358d5ec3a5e) +++ library/nx/nx.tcl (.../nx.tcl) (revision fa93101c8752ada9299561f075b61c2e6144e3f5) @@ -8,7 +8,6 @@ # set ::nsf::bootstrap ::nx - puts stderr ====[::nsf::configure objectsystem] # # First create the ::nx object system. # @@ -143,7 +142,7 @@ # define method "method" for Class and Object ::nsf::method Class method { - name arguments body -precondition -postcondition + name arguments -> body -precondition -postcondition } { set conditions [list] if {[info exists precondition]} {lappend conditions -precondition $precondition} @@ -154,13 +153,13 @@ if {$r ne ""} { # the method was not deleted ::nsf::methodproperty $(object) $r call-protected [::nsf::dispatch $(object) __default_method_call_protection] - if {[info exists returns]} {::nsf::methodproperty $(object) $r returns $returns} + if {[info exists >]} {::nsf::methodproperty $(object) $r returns ${>}} } return $r } ::nsf::method Object method { - name arguments body -precondition -postcondition -returns + name arguments -> body -precondition -postcondition } { set conditions [list] if {[info exists precondition]} {lappend conditions -precondition $precondition} @@ -171,7 +170,7 @@ if {$r ne ""} { # the method was not deleted ::nsf::methodproperty $(object) $r call-protected [::nsf::dispatch $(object) __default_method_call_protection] - if {[info exists returns]} {::nsf::methodproperty $(object) $r returns $returns} + if {[info exists >]} {::nsf::methodproperty $(object) $r returns ${>}} } return $r } @@ -317,22 +316,24 @@ # # -frame object|method make only sense for c-defined cmds, # - Object public method alias {methodName {-frame default} cmd} { + Object public method alias {methodName -> {-frame default} cmd} { array set "" [:__resolve_method_path -per-object $methodName] #puts "object alias $(object).$(methodName) $cmd" set r [::nsf::alias $(object) -per-object $(methodName) \ -frame $frame $cmd] ::nsf::methodproperty $(object) -per-object $r call-protected \ [::nsf::dispatch $(object) __default_method_call_protection] + if {[info exists >]} {::nsf::methodproperty $(object) $r returns ${>}} return $r } - Class public method alias {methodName {-frame default} cmd} { + Class public method alias {methodName -> {-frame default} cmd} { array set "" [:__resolve_method_path $methodName] #puts "class alias $(object).$(methodName) $cmd" set r [::nsf::alias $(object) $(methodName) -frame $frame $cmd] ::nsf::methodproperty $(object) $r call-protected \ [::nsf::dispatch $(object) __default_method_call_protection] + if {[info exists >]} {::nsf::methodproperty $(object) $r returns ${>}} return $r }