View · Search · Index
No registered users in community xowiki
in last 10 minutes

Re: [Xotcl] "tie" command

From: Kristoffer Lawson <setok_at_fishpool.com>
Date: Fri, 24 Jan 2003 16:44:58 +0200 (EET)

On Fri, 24 Jan 2003, Gustaf Neumann wrote:

>
> we could provide an option -bind <varname> to the new instproc to allow
> the user to specify a local or a per-object or global variable name, but
> this does not provide reference counting at all. i have started some time ago

Oh, I meant to say that an option to [new] is not necessarily the best.
Often (at least in my case) it is a method of an object which creates
an instance and returns it, like:

set msg [$cmdReader getNewMessage]

So at the level where I want the automisation I don't directly call new.
Naturally this could be changed to accommodate the use of new, but then
my interface wouldn't be as cleanly split up.

This is why I thought of [tie] as a separate thing, not tied to [new].

Anyway, I don't know if it makes sense to add yet another automatic
destruction system, but it did pop into my mind when doing things like the
above :-)

                              / http://www.fishpool.com/~setok/