Skip to content
Tcl Source Code History Of Ticket 1821332
Login

History Of Ticket 1821332

Artifacts Associated With Ticket 1821332

  1. Ticket change [5f3cf04c5b] (rid 115776) by nobody on 2007-10-27 19:25:21:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      I don't know if I'm right here:
      (tcl85b1 on WinXP with TclOO01)
      
      ------------
      package require TclOO
      
      oo::class create test {
          
          method selfcaller {} {
              puts [self caller]
          }
      }
      
      set t [test new]
      
      $t selfcaller
      ------------
      
      Error:
      caller is not an object
          while executing
      "self caller"
          (class "::test" method "selfcaller" line 2)
          invoked from within
      "$t selfcaller"
          (file "sample1.tcl" line 12)
      
      I was expecting a list like:
      "[list [self class] [self object] [self method]]"
      e.g.:
      {::test ::oo::Obj4 selfcaller}
      
    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: "nobody"
    10. subsystem initialized to: "35. TclOO Package"
    11. title initialized to: "TclOO: [self caller]"
    12. type initialized to: "Bug"
  2. Ticket change [c0617dc7e2] (rid 102391) by dkf on 2007-10-28 05:20:59:

    1. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      That's because that operation returns information about the *caller* of the method if that's also a method. Thus, If you'd done this:
      
        oo::class create test {
           method foo {} { my bar }
           method bar {} { puts [self caller]; my destroy }
        }
        [test new] foo
      
      you might have ended up with output like this:
      
        ::test ::oo::Obj6 foo
      
      Returning the other information would have been redundant. :-)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  3. Ticket change [bfa0035aae] (rid 102278) by dkf on 2007-10-28 05:21:20:

    1. closedate changed to: "2007-10-27T22:21:20"
    2. closer changed to: "dkf"
    3. resolution changed to: "Invalid"
    4. status changed to: "Closed"