Ticket UUID: | 2006641 | |||
Title: | modified next command handling | |||
Type: | RFE | Version: | None | |
Submitter: | wiede | Created on: | 2008-06-30 10:58:27 | |
Subsystem: | 35. TclOO Package | Assigned To: | dkf | |
Priority: | 6 | Severity: | Minor | |
Status: | Closed | Last Modified: | 2013-08-20 10:54:17 | |
Resolution: | Accepted | Closed By: | dkf | |
Closed on: | 2013-08-20 10:54:17 | |||
Description: |
In the current implementation of TclOO a class with 2 superclasses has an unexpected handling of the next command. if in the constructor there are 2 calls to next then always the constructor of the first superclass is called. I think a "natural" way would be to always call any entry in a call chain only once. proposed change: add a hasBeenCalled flag to the CallChain struct and modify TclOOInvokeContext, to set the hasBeenCalled flag after a call to a method in the call chain. When doing the next call to a method in the call chain, check for entries, which have hasBeenCalled set and skip them until the first entry, which has not set hasBeenCalled. At the end (if (isFirst) { ... }) reset hasBeenCalled for all entries in the call chain. That would also help itcl to be able to use the "normal" constructor call chain. At the moment itcl is using constructor methods and has additional code to build the correct (for itcl) constructor call chain. | |||
User Comments: |
dkf added on 2013-08-20 10:54:17:
Evidence suggests that the nextto mechanism handles this adequately. dkf added on 2012-05-17 17:55:16: Does the [nextto] command provide an alternate mechanism for dealing with this? dkf added on 2012-05-17 17:53:32: IP - Comment Removed: 94.168.233.125 dkf added on 2012-05-17 17:53:28: IP - Comment Removed: 94.168.233.125 dkf added on 2012-05-17 17:53:25: IP - Comment Removed: 94.168.233.125 dkf added on 2012-05-17 17:53:23: IP - Comment Removed: 94.168.233.125 wiede added on 2008-10-06 00:12:09: sorry for posting 4 times, had problems with my browser wiede added on 2008-10-06 00:10:41: File Deleted - 296167: wiede added on 2008-10-06 00:09:38: File Added - 296167: tcloo_bad_next.tcl How the proposed change is done is not important, it's only described here to describe the logic I would like to have. In the attached file find an example which also makes problems using TclOO File Added: tcloo_bad_next.tcl wiede added on 2008-10-06 00:08:51: File Added - 296166: tcloo_bad_next.tcl How the proposed change is done is not important, it's only described here to describe the logic I would like to have. In the attached file find an example which also makes problems using TclOO File Added: tcloo_bad_next.tcl wiede added on 2008-10-06 00:07:52: File Added - 296165: tcloo_bad_next.tcl How the proposed change is done is not important, it's only described here to describe the logic I would like to have. In the attached file find an example which also makes problems using TclOO File Added: tcloo_bad_next.tcl wiede added on 2008-10-06 00:07:30: File Added - 296164: tcloo_bad_next.tcl How the proposed change is done is not important, it's only described here to describe the logic I would like to have. In the attached file find an example which also makes problems using TclOO File Added: tcloo_bad_next.tcl |
Attachments:
- tcloo_bad_next.tcl [download] added by wiede on 2008-10-06 00:07:30. [details]