Re: Referencing values in an array



Stefan,
thanks a lot for your message and help.
I'm still a bit confused as I'm totally new to TCL and I'm not sure if I understand all your suggestions and how they would make my (actually more complex) application easier or more elegant.

stefan wrote:
2. You seem to devise the shapes array as devise to store MyShape
instances in
an addressable "store". Well, you double your efforts here, that's
what an object system
should do for you. XOTcl does (in many flavours).

Well, I have many Slides each with a lot of shapes (it's a powerpoint import application). So I don't want to have ALL instances of MyShape but only instances of a given slide. This might be doable by defining another identifier for the slide but creating a container holding the references to all instances is the typical way I used to program. There might be better solutions especially in tcl.

btw: What is the difference between "my" and "self"? Does "my" reference the instance and self the current object/methode "self" is in?

Servus nach Wien
Daniel
.



Relevant Pages

  • Re: Referencing values in an array
    ... I'm still a bit confused as I'm totally new to TCL and I'm not sure if I ... but only instances of a given slide. ... another identifier for the slide but creating a container holding the ... Including slides and per-slide aggregations of shapes is just a little ...
    (comp.lang.tcl)
  • Re: Tcl/TK is indeed dying
    ... unnecesary "features" that would belong to extensions for special ... having an object system in Tcl itself specifically or an example of ... than the object system. ... The large parts that embedders think they don't need ...
    (comp.lang.tcl)
  • Re: What does Tcl lack?
    ... rationals "What Every Computer Scientist Should Know About ... > I'd say that such methods of operating are quite reasonable in Tcl ... I just mentioned MD and the MOP because this is what makes CLOS ... its object system in terms of and/or with an object system as does ...
    (comp.lang.tcl)
  • Re: ITcl 3.3
    ... design first. ... That is one of reasons why I consider ITcl worst object system for Tcl. ... I use objects when I feel its a natural fit for the problem I'm working ...
    (comp.lang.tcl)
  • Re: ITcl 3.3
    ... I am coming indeed from object oriented design - Object oriented ... You don't have this without an unified object system. ... The most thing I like on Tcl is, that it is simple and practical usefull ... First: C is as elegant as the people who program it and second: ...
    (comp.lang.tcl)