Skip to content
Tcl Source Code History Of Ticket 9dd1bd7a74bc6e9e
Login

History Of Ticket 9dd1bd7a74bc6e9e

Artifacts Associated With Ticket 9dd1bd7a74bc6e9e

  1. Ticket change [238737f1d7] (rid 141729) by anonymous on 2015-05-12 16:04:44:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      Invoking [self] in the destructor returns an empty string if an error was raised in the constructor, except if [self] had been invoked in the constructor prior to the error.  Please, see following recipe to reproduce:
      
      ~~~
      # TclOO bug.  [self] returns no value on the destructor if:
      # - There is an error while constructing the object.
      # - [self] is not invoked prior to the error.
      ::oo::class create noself {
          constructor {args} {
      	error "Some error in NOSELF constructor.";
          }
          destructor {
      	puts "I have no self='[self]'.";
          }
      }
      
      ::oo::class create yesself {
          constructor {args} {
      	self;
      	error "Some error in the YESSELF constructor after invoking \[self\].";
          }
          destructor {
      	puts "I do have self='[self]'.";
          }
      }
      
      catch {noself new};
      catch {yesself new};
      ~~~
      
      The script outputs the following:
      
      ~~~
      I have no self=''.
      I do have self='::oo::Obj24'.
      ~~~
      
    5. foundin initialized to: "1.0.1"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "3410fe6f8504d01909e548b02e0cec50a5f7fab3"
    10. resolution initialized to: "None"
    11. severity initialized to: "Severe"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "35. TclOO Package"
    15. title initialized to:
      [self] returns empty string in destructor when constructing fails
      
    16. type initialized to: "Bug"
  2. Ticket change [86b3afc962] (rid 141763) by dkf on 2015-05-15 13:26:07:

    1. assignee changed to: "dkf"
    2. icomment:
      Good catch; it's a race between the construction of the name and the deletion, with some traces in the mix too to make it all complicated.
      
    3. login: "dkf"
    4. mimetype: "text/html"
    5. priority changed to: "8"
    6. username: "dkf"
  3. Ticket change [b56f111c0b] (rid 141768) by dkf on 2015-05-15 13:55:10:

    1. login: "dkf"
    2. mimetype: "text/plain"
    3. resolution changed to: "Fixed"
  4. Ticket change [ea9a0c49ed] (rid 141769) by dkf on 2015-05-15 14:02:24:

    1. closedate changed to: "2457158.08500165"
    2. closer changed to: "dkf"
    3. icomment:
      Should be fixed in Tcl 8.6 and next release of TclOO package.
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "dkf"