Index: TODO =================================================================== diff -u -rdaafc0f0261f6b47a01c7cc8975acdd66f91f360 -r35e0efc0d8851a10c70071c12112b11538ce97af --- TODO (.../TODO) (revision daafc0f0261f6b47a01c7cc8975acdd66f91f360) +++ TODO (.../TODO) (revision 35e0efc0d8851a10c70071c12112b11538ce97af) @@ -812,10 +812,10 @@ - copied infoObjectMethod and infoClassMethod decls as comments to xotcl.c, aligned order of method definitions -- removed - [o exists varname] - from next scripting language +- removed "[o exists varname]" from next scripting language +- reanimated "info vars" to show locals in eval method + TODO: - rename source files from xotcl{Int}.{ch}->next*.* | next-scripting*.* ? Stefan, meinung dazu? Notwending|Empfehlenswert|nicht? Index: generic/predefined.h =================================================================== diff -u -rdaafc0f0261f6b47a01c7cc8975acdd66f91f360 -r35e0efc0d8851a10c70071c12112b11538ce97af --- generic/predefined.h (.../predefined.h) (revision daafc0f0261f6b47a01c7cc8975acdd66f91f360) +++ generic/predefined.h (.../predefined.h) (revision 35e0efc0d8851a10c70071c12112b11538ce97af) @@ -382,8 +382,9 @@ "::nx::RelationSlot create ${os}::Class::slot::object-filter -elementtype \"\"}\n" "::nx::core::register_system_slots ::nx\n" "proc ::nx::core::register_system_slots {} {}\n" -"::nx::MetaSlot __invalidateobjectparameter\n" -"# @param incremental Allows for using the fine-grained modification (i.e., setting) of the managed variable {e.g., through an incremental {{{add}}})\n" +"::nx::MetaSlot __invalidateobjectparameter}\n" +"namespace eval ::nx {}\n" +"namespace eval ::nx {\n" "::nx::MetaSlot create ::nx::Attribute -superclass ::nx::ObjectParameterSlot\n" "createBootstrapAttributeSlots ::nx::Attribute {\n" "{value_check once}\n" Index: generic/predefined.xotcl =================================================================== diff -u -rdaafc0f0261f6b47a01c7cc8975acdd66f91f360 -r35e0efc0d8851a10c70071c12112b11538ce97af --- generic/predefined.xotcl (.../predefined.xotcl) (revision daafc0f0261f6b47a01c7cc8975acdd66f91f360) +++ generic/predefined.xotcl (.../predefined.xotcl) (revision 35e0efc0d8851a10c70071c12112b11538ce97af) @@ -966,12 +966,16 @@ ::nx::MetaSlot __invalidateobjectparameter # @object ::nx::Attribute - +} +namespace eval ::nx { # Attribute slots are used to manage the access, mutation, and # querying of instance variables. There is a helper method {{@method # ::nx::Object class attribute}} to define the attributes of classes # (and objects). Consider the example of a class definition with # three attribute slots: +} +namespace eval ::nx { + # {{{ # Class create Person { # :attribute name Index: generic/xotclStack85.c =================================================================== diff -u -r63626dfe7b97728f4103a7873214038e7b15d74e -r35e0efc0d8851a10c70071c12112b11538ce97af --- generic/xotclStack85.c (.../xotclStack85.c) (revision 63626dfe7b97728f4103a7873214038e7b15d74e) +++ generic/xotclStack85.c (.../xotclStack85.c) (revision 35e0efc0d8851a10c70071c12112b11538ce97af) @@ -92,6 +92,7 @@ Tcl_PushCallFrame(interp, framePtr, Tcl_CallFrame_nsPtr(varFramePtr), 1|FRAME_IS_XOTCL_CMETHOD); Tcl_CallFrame_clientData(framePtr) = (ClientData)cscPtr; + Tcl_CallFrame_procPtr(framePtr) = &RUNTIME_STATE(interp)->fakeProc; } static void XOTcl_PopFrameCsc(Tcl_Interp *interp, Tcl_CallFrame *framePtr) { Index: tests/varresolutiontest.tcl =================================================================== diff -u -rdaafc0f0261f6b47a01c7cc8975acdd66f91f360 -r35e0efc0d8851a10c70071c12112b11538ce97af --- tests/varresolutiontest.tcl (.../varresolutiontest.tcl) (revision daafc0f0261f6b47a01c7cc8975acdd66f91f360) +++ tests/varresolutiontest.tcl (.../varresolutiontest.tcl) (revision 35e0efc0d8851a10c70071c12112b11538ce97af) @@ -1,4 +1,4 @@ -# testing var resolution for namespace-shadowed objects +# testing var resolution package require next; namespace import ::nx::* package require xotcl::test @@ -717,4 +717,20 @@ } ? {lsort [V info vars]} {Z} ? {lsort [v info vars]} {z} -} \ No newline at end of file +} + +# +# test [info vars] in eval method +# + +Test case info-vars-in-eval { + + Object create o + ? {o eval { + set x 1 + expr {[info vars "x"] eq "x"} + }} 1 +} + + +