Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 496e56937d43bb9762b9e5aa58a258766c57b8be
Ticket: 2952145fffffffffffffffffffffffffffffffff
Constructor call chain configuration
User & Date: apnadkarni on 2010-02-15 15:56:49
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    A posting by Martin Lembourg in c.l.t leads to the following question - how does one implement the following scenario: Two independent classes A and B and a class C that derives from both of them. I want to be able create objects of each of these classes. When I create an object of class C, constructors for both A and B must be called.
    
    The issue is that ( assuming the statement "superclass A B" in C's definition), if A's constructor has a command "next", the statement "A create foo" raises an error "no next constructor implementation". If we remove the "next" command from A's constructor, then "A create foo" works but then when doing "C create bar", the constructor for B does not get called (presumably because A's constructor no longer has a next statement).
    
    So how does one write code to meet the above requirements ?
    
    (tested with CVS HEAD as of Feb 15 2010)
    
    /Ashok
    
  4. foundin changed to: "obsolete: 8.6b1.1"
  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: "apnadkarni"
  10. subsystem changed to: "35. TclOO Package"
  11. title changed to: "Constructor call chain configuration"
  12. type changed to: "Bug"