Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add [myclass] to documented changes. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
4b1c4395c11d762f68f1eaf8015b5d46 |
User & Date: | dkf 2018-07-07 09:03:05.072 |
Context
2018-07-07
| ||
10:03 | Added TIP 513 for Florian Murr check-in: aba779d300 user: dkf tags: trunk | |
09:03 | Add [myclass] to documented changes. check-in: 4b1c4395c1 user: dkf tags: trunk | |
2018-07-04
| ||
09:42 | Update 483 status. check-in: f242c154fe user: stu tags: trunk | |
Changes
Changes to tip/478.md.
︙ | ︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | class variable and not to instance/object variables. They also provide a way to initialize the class variables. This TIP seeks to add them into TclOO. # Proposal The proposal is to add some or all of the functionality of `oo::util`, in particular the `classvariable` and `classmethod`. Additionally, it is proposed to add an `initialise` class definition command to all the initialization of class variables. ## New Metaclasses The `oo::singleton` metaclass only allows a single instance of the class that it is mixed into to exist at a time. It hides the `create` method on the class and implements a cache so that the `new` method will only create an instance of the class if there is not an existing instance. Subclasses of the singleton class are _not_ restricted. | > > > > > > > > > | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | class variable and not to instance/object variables. They also provide a way to initialize the class variables. This TIP seeks to add them into TclOO. # Proposal The proposal is to add some or all of the functionality of `oo::util`, in particular the `classvariable` and `classmethod`. Additionally, it is proposed to add an `initialise` class definition command to all the initialization of class variables. ## New Basic Features The `myclass` command (created in each object's namespace) allows any method (exported or unexported) of the current class of the owning object to be invoked. It is like using `info object class` to look up the class of the current object, `info object namespace` to find the namespace of the class, then using the `my` command in that namespace (assuming that it hasn't been renamed). This is implemented in C so it is fast, effective, and robust. ## New Metaclasses The `oo::singleton` metaclass only allows a single instance of the class that it is mixed into to exist at a time. It hides the `create` method on the class and implements a cache so that the `new` method will only create an instance of the class if there is not an existing instance. Subclasses of the singleton class are _not_ restricted. |
︙ | ︙ |