|
2013-09-09
| ||
| 14:13 | • Closed ticket [3609693fff]: copied object member variable confusion plus 7 o... artifact: c8c18b8322 user: dkf | |
| 14:12 | [3609693] Must strip the internal representation of procedure-like methods in order to ensure that a... check-in: e5fba23b18 user: dkf tags: trunk | |
| 14:02 | • Open ticket [3609693fff]: copied object member variable confusion plus 6 oth... artifact: b37a9cce49 user: dkf | |
| 13:37 | • Closed ticket [3609693fff]. artifact: 68e0d967a9 user: dkf | |
| 13:34 | [3609693] Must strip the internal representation of procedure-like methods in order to ensure that a... closed check-in: 847567403d user: dkf tags: bug-3609693 | |
|
2013-08-21
| ||
| 09:38 | • Ticket [3609693fff] copied object member variable confusion status still Ope... artifact: 0a1bef4d34 user: dkf | |
|
2013-08-03
| ||
| 19:21 | • Ticket [3609693fff]: 5 changes artifact: e5beba6964 user: dkf | |
|
2013-04-01
| ||
| 23:46 | • Ticket [3609693fff]: 5 changes artifact: 65569c49f7 user: dkf | |
| 13:41 | • New ticket [3609693fff]. artifact: 3aff957e59 user: pooryorick | |
copied object member variable confusion
Closed / Fixed3609693fffffffffffffffffffffffffffffffffCreated 14 years agoUpdated 13 years ago
Descriptionplain2013-04-01 13:41:41
In the following script, $obj2 thinks the value of its $var1 is "val1"
namespace import oo::*
set obj [object new]
objdefine $obj variable var1
objdefine $obj method m {} {
set var1 val1
}
objdefine $obj method get {} {
return $var1
}
$obj m
$obj get
set obj2 [oo::copy $obj]
${obj2}::my eval {
set var1 val2
}
puts [$obj2 get]
dkfplain2013-04-01 23:46:05
Looks like there's a cached reference to the variable in the method implementation, which is indeed the case because that's how variable references in object-specific methods are bound. The method cloner needs work...
dkf Ticket [3609693fff]: 5 changes
[History diff]2013-08-03 19:21:51
dkfwiki2013-08-21 09:38:47
Committed a test to branch bug-3609693, but the code I've got to try and fix this crashes quite a distance away; I'm doing something wrong, but I don't know what.
dkfhtml2013-09-09 13:37:24
Ah! Needed to strip the internal representation from the body to prevent some strange things from happening. Fixed now.
dkfhtml2013-09-09 14:02:05
Damn. This breaks itcl completely.
dkfhtml2013-09-09 14:13:42
False alarm; that crash happens without this change too. Whatever's going on, it's not this.
Log in (anonymous is fine) to add a comment.