Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 10ccc18f10ff9222ff9c841eb4d57ac7dc507f47fc28dc8f2599e38a56759827
Ticket: 794298036fda15d18e9ee7251bb948dabe8fd498
oo::class appears to confiscate the 'create' method on all its descendants.
User & Date: dgp on 2018-06-02 11:18:16
Changes

  1. assignee changed to: "dgp"
  2. closedate changed to: "2458271.97102236"
  3. closer changed to: "dgp"
  4. icomment:
    
    This looks like a confusion between the instance relationship and the
    inheritance relationship.
    
    To override [Class create], use [oo::objdefine]:
    
    % oo::class create Class {
        method create {args} {
    	error "Should Error, but doesn't - this is a bug, it means no oo::class instance can override create method"
        }
    }
    ::Class
    % Class create Instance
    ::Instance
    
    
    % oo::objdefine Class method create args {error demo}
    % Class create Demo
    demo
    
  5. login: "dgp"
  6. mimetype: "text/plain"
  7. resolution changed to: "Invalid"
  8. status changed to: "Closed"