Overview
Artifact ID: | f1cb51b4c1a4fc3792c931e947cb3abf996b0268 |
---|---|
Ticket: | 9d0cfbc51e3b6281aae4447c3603591dc0ec35d9
method [create] is handled very differently from other methods |
User & Date: | dkf 2014-01-27 12:01:47 |
Changes
- closedate changed to: "2456685.00124179"
- closer changed to: "dkf"
- icomment:
Everything looks fine to me, and I've not done anything odd here for ages. <pre> % oo::class create creator { method moop {args} { puts stderr "moop" } method create {args} { puts stderr "create" } constructor {args} { puts stderr "constructed" } } ::creator % creator ? unknown method "?": must be create, destroy or new % creator create fred constructed ::fred % fred ? unknown method "?": must be create, destroy or moop </pre> However, it should be noted that the <tt>create</tt> that you normally see is the one provided by the <i>class</i> object, not the instance object. It's actually a normal method that is implemented in C and defined on the <tt>oo::class</tt> class. <pre> % info class methods oo::class create new % info class methods oo::class -all create destroy new </pre> (The <tt>-all</tt> means use the superclass method implementations as well, so it picks it up from the <tt>oo::object</tt> class.) <p> Metaclasses are funky stuff.
- login: "dkf"
- mimetype: "text/html"
- resolution changed to: "Invalid"
- status changed to: "Closed"
- subsystem changed to: "35. TclOO Package"
- username: "dkf"