#10 closed defect (fixed)
TimeSet global & TimeSet no global
Reported by: | rcsoto | Owned by: | danirus |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Kernel | Version: | head |
Severity: | major | Keywords: | |
Cc: | jimarin |
Description
When working with TimeSet not global, an error when acceding to the created
object.
To see the following example:
TimeSet global. It works correctly.
Serie ser = Gaussian(0,1,Monthly)+Gaussian(1,0.5,Monthly);
TimeSet fec = Dating(ser);
Serie fun( Serie ser)
{
Set s = MatSerSet(Row(1,2,3,4,5,6,7,8,9,10) ,fec , y2000);
Serie b = s[1] ;
b
};
Serie c=fun(ser);
TimeSet not global. Error when operating with Serie c.
Serie ser = Gaussian(0,1,Monthly)+Gaussian(1,0.5,Monthly);
Serie fun( Serie ser)
{
TimeSet fec = Dating(ser);
Set s = MatSerSet(Row(1,2,3,4,5,6,7,8,9,10) ,fec , y2000);
Serie b = s[1] ;
b
};
Serie c = fun(ser);
Change History (6)
comment:1 Changed 21 years ago by
Status: | new → assigned |
---|
comment:2 Changed 21 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 Changed 21 years ago by
blocked: | → 80 |
---|
comment:4 Changed 21 years ago by
Cc: | jimarin added |
---|
comment:6 Changed 18 years ago by
bug_file_loc: | → http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000010 |
---|
This is a problem related with attribute nRefs_ that all Tol Object inherit from
BAtom class.
When we create a Serie, we associates it with a TimeSet that represent its
dating_ attribute. All Series need a TimeSet (dating_ attribute) to live.
When we use a local TimeSet (I say, a TimeSet inside not global scope) to create
a Serie, Tol removes it after leaving the scope (a function or whatever) and
then abort when we try to use that Serie.
Uploaded solution increments nRefs_ attribute of that TimeSet in order to be
used by that Serie, although it does not exist in the global scope.