Artifacts Associated With Ticket 1865198
Ticket change [78be0444f3] (rid 90014) by wiede on 2008-01-06 17:27:02:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
There is one function, which is needed in itcl-ng but I think it should be in the TclOO Source code: calling a class method without an object context. This is mostly used for the equivalent of the C++ static class method invocation, which in itcl is called a "class proc". As it mostly does the same as TclOO's InvokeProcedure method and it uses TclOO internal stuff, I think it should be added to TclOO source code. A prototype implementation, which is used at the moment in itcl-ng is in the attachment.
- foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "wiede"
- subsystem initialized to: "35. TclOO Package"
- title initialized to: "Additional class method invoking function in TclOO"
- type initialized to: "RFE"
Ticket change [10b278c963] (rid 95004) by wiede on 2008-01-07 00:27:02:
- icomment:
File Added - 261064: classmethodinvoke.c
- login: "wiede"
- mimetype: "text/plain"
- username: "wiede"
- icomment:
Add attachment "classmethodinvoke.c" [951b27bb14] (rid 106105) by wiede on 2008-01-07 00:27:02.
Ticket change [6181fe7bcc] (rid 92250) by wiede on 2008-01-07 01:29:54:
- icomment:
File Added - 261069: classmethodinvoke2.c Logged In: YES user_id=558925 Originator: YES I have added a slightly modified version of the function, which allows me to use it on a second place for itcl ensembles (which are nevertheless mostly running as namespace ensembles already). File Added: classmethodinvoke2.c
- login: "wiede"
- mimetype: "text/plain"
- username: "wiede"
- icomment:
Add attachment "classmethodinvoke2.c" [cebb06b29d] (rid 96101) by wiede on 2008-01-07 01:29:54.
Ticket change [11baf1113c] (rid 95195) by dkf on 2008-01-14 22:14:46:
- priority changed to: "9 Immediate"
Ticket change [02814e15c3] (rid 119662) by dkf on 2008-05-08 22:22:25:
- icomment:
Logged In: YES user_id=79902 Originator: NO Reducing priority; this can be addressed after the TIP#257 vote.
- login: "dkf"
- mimetype: "text/plain"
- priority changed to: "8"
- username: "dkf"
- icomment:
Ticket change [3c55c57831] (rid 120900) by dkf on 2009-07-12 22:12:19:
- icomment:
How does a class method work? Is it just like invoking a method on the class object? If so, can do it like this: oo::class create Foo { constructor {} { interp alias {} [namespace current]::Foo->my {} [info object namespace Foo]::my } forward foo Foo->my foo self method foo {args} { puts "[self], $args" } } Arguably there's a need for a neater way to do this so that more of the machinery is hidden, but this will work. (Note that this is a real class method; none of the object-specific state variables or methods are visible at all. The method can be invoked just the same on the class object.) - login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [5c7500c4b5] (rid 115303) by dkf on 2009-07-12 22:13:04:
- priority changed to: "5 Medium"
- title changed to: "Support class methods"
Ticket change [4332ea2489] (rid 116512) by dkf on 2009-07-13 01:18:06:
- priority changed to: "7 High"
Add attachment "class.tcl" [9cf504c9a8] (rid 96234) by dkf on 2009-08-02 22:20:41.
Ticket change [e8b64f38d1] (rid 104693) by dkf on 2009-08-02 22:20:42:
- icomment:
File Added - 337678: class.tcl
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [f1c61e974d] (rid 109415) by dkf on 2009-08-02 22:22:13:
- icomment:
I've attached a Tcl script that allows the declaration of class methods, and which also supports class variables.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [e239ea5dc4] (rid 226533) by dkf on 2024-05-23 14:23:01:
- closedate changed to: "2460454.09932471"
- closer changed to: "dkf"
- comment changed to:
There is one function, which is needed in itcl-ng but I think it should be in the TclOO Source code: calling a class method without an object context. This is mostly used for the equivalent of the C++ static class method invocation, which in itcl is called a "class proc". As it mostly does the same as TclOO's InvokeProcedure method and it uses TclOO internal stuff, I think it should be added to TclOO source code. A prototype implementation, which is used at the moment in itcl-ng is in the attachment.
- icomment:
Tcl 8.7/9.0 have the solution to this: the `classmethod` definition command in [TIP #478](https://core.tcl-lang.org/tips/doc/trunk/tip/478.md).
- login: "dkf"
- mimetype: "text/x-markdown"
- resolution changed to: "Out of Date"
- severity changed to: "Minor"
- status changed to: "Closed"