Hi all, I am having a problem after I tried to modify a class definition. The class in question is called CMTaks and the only change I made was add an instance variable called 'notified' and its accessors. I did that in Pharo and exported the changes with Monticcello and imported them in my glass instance with a code like this:| repository directory | directory := FileDirectory on: '/home/glass'. repository := MCDirectoryRepository new. repository directory: directory. (repository versionFromFileNamed: 'CM-Model-AlejandroZuzek.6.mcz') load. % Thanks, Alejandro |
Alejandro,
You have run into one of the gotchas in GemStone ... In Pharo classes are modified all instances of the class are automaticelly migrated. In GemStone, we create a new instance of the class with new new instance variables, etc and we do not automatically migrate all instances of the class. We do this because we must be able to decouple class changes from the migration of instances ... In a large data base, the migration of instances may take a very long time since the entire db must be swept so automatic migration is not always feasible ... For GLASS I have added auto-migration of instances as an OPTION. It is controlled by MCPlatformSupport class>autoMigrate. The default for autoMigrate is FALSE. In GemTools auto migration is enabled by default, but in Topaz, it is disabled by default. Before doing your install, you should set autoMigrate to true... There is a a helper class called GsDeployer that should probably be used: GsDeployer deploy: [ | repository directory | directory := FileDirectory on: '/home/glass'. repository := MCDirectoryRepository new. repository directory: directory. (repository versionFromFileNamed: 'CM-Model-AlejandroZuzek.6.mcz') load ]. would have done the trick for you... Dale From: "Alejandro Zuzek" <[hidden email]> |
It worked like a charm and Gemstone is awesome! Thanks On Tue, May 21, 2013 at 3:08 PM, Dale K. Henrichs <[hidden email]> wrote:
|
Note to self: Class Creation, Versions and Instance Migration is explained in Chapter 9 of the Programming Guide (GS64-ProgGuide-3.0.pdf) On Tue, May 21, 2013 at 11:24 PM, Alejandro Zuzek <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |