Skip to content
Tcl Source Code History Of Ticket 1824958fffffffffffffffffffffffffffffffff
Login

History Of Ticket 1824958fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 1824958fffffffffffffffffffffffffffffffff

  1. Ticket change [2c7cc2c670] (rid 118911) by jima00 on 2007-11-02 23:35:47:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      is this a problem with self.export?
      
      package require TclOO
      namespace import ::oo::*
      
      class create ::WEA {
        method WEA {
          args
        } {
          puts {*}$args
        }
      }
      
      define ::WEA self.export WEA
      
      ::WEA WEA WEA
      unknown method "WEA": must be WEA, create, destroy or new
      
    4. foundin initialized to: "obsolete: 8.5b2"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "jima00"
    10. subsystem initialized to: "35. TclOO Package"
    11. title initialized to: "self.export problem (?)"
    12. type initialized to: "Bug"
  2. Ticket change [a031e0766f] (rid 96758) by jima00 on 2007-11-09 17:32:30:

    1. icomment:
      Logged In: YES 
      user_id=1928331
      Originator: YES
      
      I think it might be related with the observation things go different having used create or define upon objects in TclOO.
      
      Here is an example of what I mean:
      
      package require TclOO
      ::oo::object create ::OBJ {
       method FOO {args} {puts {*}$args}
      }
      puts "Methods: [info object methods ::OBJ -all]"    ;# <---- GIVES "Methods: "
      ::oo::define ::OBJ {
       method BAR {args} {puts {*}$args}
      }
      puts "Methods: [info object methods ::OBJ -all]"    ;# <---- GIVES "Methods: BAR"
      
      
      Is this as intended to be?
      Should I always use "new" and then ::oo::define everything apart?
      
      Thanks in advance.
      
      
    2. login: "jima00"
    3. mimetype: "text/plain"
    4. username: "jima00"
  3. Ticket change [5eee35cfdd] (rid 115721) by dkf on 2007-11-09 18:02:25:

    1. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      OK, there's a few problems here.
      
      Firstly, in your issue below the problem is that the default constructor for oo::object does absolutely nothing at all, and ignores all arguments. Use a subclass of oo::object to define your own behaviour, perhaps like this:
        oo::class create myObject {
           constructor {script} {::oo::define [self] $script}
        }
      
      Secondly, the main point of this bug report *is* a bug. The bug is that the "export record" for the undefined object method "WEA" is being interpreted as a real method when generating the error message. Oops!
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. priority changed to: "8"
    5. username: "dkf"
  4. Ticket change [7824afab82] (rid 89904) by dkf on 2007-11-09 20:58:21:

    1. closedate changed to: "2007-11-09T13:58:21"
    2. closer changed to: "dkf"
    3. resolution changed to: "Fixed"
    4. status changed to: "Closed"