On 19 Mar 2006, at 14:09, Scott Gargash wrote:
xotcl-bounces@alice.wu-wien.ac.at wrote on 03/19/2006 04:08:40 AM:
On 19 Mar 2006, at 00:12, Scott Gargash wrote:
When would you need the namespace of the object?
I have only ever needed the namespace of an object which attaching traces to variables (f.ex. with Tk), but for that it is, unfortunately quite necessary.
I haven't used it yet, but doesn't the "trace" method handle this?
No. Some tk widgets map their values to Tcl variables. Other similar interfaces exist. It is handy to map them to an instance variable but for that it is necessary to have the namespaced version available. Of course you could always do it through globals, but that is just more messy.
But I want lambdas. :)
I think something similar was making its way into Tcl?
This is particularly problematic as Tcl still has quite a habit of losing that original representation which naturally I hope will be reduced in the future.
Where do you see this happening? Do you mean losing the original representation via shimmering, or something else?
I've seen it happen with scripts given to [after]. I was actually very surprised by this, but at some point I was witnessing those scripts becoming strings and thus losing the original Tcl_Objs inside them (the scripts were built as lists).