Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 605136bace34c4e184f1aed570f1a53c28c5f63e
Ticket: 3474460fffffffffffffffffffffffffffffffff
targetObject should be optional for oo::copy
User & Date: basilik99 on 2012-01-16 14:41:27
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Hi,
    
    With ActiveState Tcl 8.6.0.0.295132 Beta 6, when issuing:
    
    oo::copy Class1
    
    It gives the error:
    
    "must supply a name when copying a class"
    
    However, the documentation tells that the second parameter is optional. I would indeed expect Tcl to generate a new name such as ::oo::Obj34.
    
    Note: this is useful to include the same class as a mixin in each class of a hierarchy. It seems Tcl only mixins a class once per hierarchy and not once per class having "mixin MyMixClass" in that hierarchy. So putting "mixin [oo::copy MyMixClass]" in each class of the hierarchy should solve the problem. This allow to add extra code to a method between each stage of the hierarchy.
    
    Thanks,
    Etienne
    
  4. foundin changed to: "obsolete: 8.6b2"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "basilik99"
  10. subsystem changed to: "35. TclOO Package"
  11. title changed to: "targetObject should be optional for oo::copy"
  12. type changed to: "Bug"