Skip to content
Tcl Source Code History Of Ticket 1865198fffffffff
Login

History Of Ticket 1865198fffffffff

Artifacts Associated With Ticket 1865198fffffffff

  1. Ticket change [78be0444f3] (rid 90014) by wiede on 2008-01-06 17:27:02:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. 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.
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "wiede"
    10. subsystem initialized to: "35. TclOO Package"
    11. title initialized to: "Additional class method invoking function in TclOO"
    12. type initialized to: "RFE"
  2. Ticket change [10b278c963] (rid 95004) by wiede on 2008-01-07 00:27:02:

    1. icomment:
      
      
      File Added - 261064: classmethodinvoke.c
      
      
      
    2. login: "wiede"
    3. mimetype: "text/plain"
    4. username: "wiede"
  3. Add attachment "classmethodinvoke.c" [951b27bb14] (rid 106105) by wiede on 2008-01-07 00:27:02.

  4. Ticket change [6181fe7bcc] (rid 92250) by wiede on 2008-01-07 01:29:54:

    1. 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
      
      
    2. login: "wiede"
    3. mimetype: "text/plain"
    4. username: "wiede"
  5. Add attachment "classmethodinvoke2.c" [cebb06b29d] (rid 96101) by wiede on 2008-01-07 01:29:54.

  6. Ticket change [11baf1113c] (rid 95195) by dkf on 2008-01-14 22:14:46:

    1. priority changed to: "9 Immediate"
  7. Ticket change [02814e15c3] (rid 119662) by dkf on 2008-05-08 22:22:25:

    1. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      Reducing priority; this can be addressed after the TIP#257 vote.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. priority changed to: "8"
    5. username: "dkf"
  8. Ticket change [3c55c57831] (rid 120900) by dkf on 2009-07-12 22:12:19:

    1. 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.)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  9. Ticket change [5c7500c4b5] (rid 115303) by dkf on 2009-07-12 22:13:04:

    1. priority changed to: "5 Medium"
    2. title changed to: "Support class methods"
  10. Ticket change [4332ea2489] (rid 116512) by dkf on 2009-07-13 01:18:06:

    1. priority changed to: "7 High"
  11. Add attachment "class.tcl" [9cf504c9a8] (rid 96234) by dkf on 2009-08-02 22:20:41.

  12. Ticket change [e8b64f38d1] (rid 104693) by dkf on 2009-08-02 22:20:42:

    1. icomment:
      
      
      File Added - 337678: class.tcl
      
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  13. Ticket change [f1c61e974d] (rid 109415) by dkf on 2009-08-02 22:22:13:

    1. icomment:
      I've attached a Tcl script that allows the declaration of class methods, and which also supports class variables.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  14. Ticket change [e239ea5dc4] (rid 226533) by dkf on 2024-05-23 14:23:01:

    1. closedate changed to: "2460454.09932471"
    2. closer changed to: "dkf"
    3. 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.
      
    4. 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).
      
    5. login: "dkf"
    6. mimetype: "text/x-markdown"
    7. resolution changed to: "Out of Date"
    8. severity changed to: "Minor"
    9. status changed to: "Closed"