Hi, when I load a newer version of package in vw7.9.1, it appears that all Shared variables that have been defined in that package have their values set to nil.
Scenario: -
PackageA 1.0 contains ClassA -
ClassA has a sharedVar called SharedVarA -
SharedVarA contains “true” -
Load packageA 1.1 -
SharedVarA now is nil It doesn’t seem to matter what has changed in the package, simply loading a newer version causes it to forget the shared variables’ values… Is this a known problem? Thanks, Mark _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Dear Mark,
in visual.im with Store loaded of 7.9 and 7.9.1. I find that: - if the SharedVariable definition in the loading package is the same as in the image, whatever value it has been given remains unchanged. - if the SharedVariable definition in the loading package is not the same as in the image, the SharedVariable's initializer is run, and whatever value that returns is the value it has after loading In your example, if SharedVarA's initializer were 'true' in its definition in PackageA 1.0, and were 'nil' in its definition in PackageA 1.1, then what you see is what I would expect: loading PackageA 1.1 reinitializes SharedVarA to nil. However if SharedVarA's definition, including initializer, is the same in both packages and in the image (e.g. it is nil in all three locations, and only has value true because you executed SharedVarA := true or similar) then I'd expect loading PackageA 1.1 to leave the value of SharedVarA as true. HTH Niall Ross >Hi, > >when I load a newer version of package in vw7.9.1, it appears that all Shared variables that have been defined in that package have their values set to nil. > >Scenario: > >- PackageA 1.0 contains ClassA > >- ClassA has a sharedVar called SharedVarA > >- SharedVarA contains "true" > >- Load packageA 1.1 > >- SharedVarA now is nil > >It doesn't seem to matter what has changed in the package, simply loading a newer version causes it to forget the shared variables' values... > >Is this a known problem? > >Thanks, >Mark > > > >------------------------------------------------------------------------ > >_______________________________________________ >vwnc mailing list >[hidden email] >http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > > _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Hi Niall,
Thanks for your reply. I experimented a bit and it seems to only occur when loading binary published packages. If I don't use binary loading the variables keep their values. Even though we're considering switching to non-binary loading, at this point in time we still rely on it, so we'll need a fix for this. I filed a support case for this. Best regards, Mark -----Original Message----- From: Niall Ross [mailto:[hidden email]] Sent: woensdag 27 maart 2013 20:55 To: Mark Plas Cc: [hidden email] Subject: Re: [vwnc] [vw7.9.1] shared variables are set to nil when loading new version of package Dear Mark, in visual.im with Store loaded of 7.9 and 7.9.1. I find that: - if the SharedVariable definition in the loading package is the same as in the image, whatever value it has been given remains unchanged. - if the SharedVariable definition in the loading package is not the same as in the image, the SharedVariable's initializer is run, and whatever value that returns is the value it has after loading In your example, if SharedVarA's initializer were 'true' in its definition in PackageA 1.0, and were 'nil' in its definition in PackageA 1.1, then what you see is what I would expect: loading PackageA 1.1 reinitializes SharedVarA to nil. However if SharedVarA's definition, including initializer, is the same in both packages and in the image (e.g. it is nil in all three locations, and only has value true because you executed SharedVarA := true or similar) then I'd expect loading PackageA 1.1 to leave the value of SharedVarA as true. HTH Niall Ross >Hi, > >when I load a newer version of package in vw7.9.1, it appears that all Shared variables that have been defined in that package have their values set to nil. > >Scenario: > >- PackageA 1.0 contains ClassA > >- ClassA has a sharedVar called SharedVarA > >- SharedVarA contains "true" > >- Load packageA 1.1 > >- SharedVarA now is nil > >It doesn't seem to matter what has changed in the package, simply loading a newer version causes it to forget the shared variables' values... > >Is this a known problem? > >Thanks, >Mark > > > >----------------------------------------------------------------------- >- > >_______________________________________________ >vwnc mailing list >[hidden email] >http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > > _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |