Well, this is clearly something we must improve and provide :) On Sun, Nov 27, 2011 at 12:23 AM, Yanni Chiu <yanni@rogers.com> wrote:
On 25/11/11 6:57 PM, Yanni Chiu wrote:
On 25/11/11 5:46 PM, Martin Dias wrote:
This can be the problem. Can you update these references to point NewClass?
Now that I know what's holding on to the class, I can figure out what to do. Ideally, I'd like to remove the reference to the class, and have the command list re-generated. This strategy is available for a Pier kernel, but not for the general migration problem for Fuel.
FYI, the solution was:
1) Define the old class so Fuel will load the kernel:
Object subclass: #OldCommand instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'ZZZImportExport'.
N.B. Subclass from Object, not PRCommand, because Pier looks for all subclasses of PRCommand. (This may not have been necessary, but was done just in case).
2) Change the reference from OldClass to NewClass
PUSecurity allInstances do: [ :each | each otherPermissions do: [ :perm | perm command = OldCommand ifTrue: [ perm setCommand: NewCommand ] ]. each groupPermissions do: [ :perm | perm command = OldCommand ifTrue: [ perm setCommand: NewCommand ] ]. each ownerPermissions do: [ :perm | perm command = OldCommand ifTrue: [ perm setCommand: NewCommand ] ]. ].
3) Re-serialize with Fuel
4) Remove the migration code
-- Mariano http://marianopeck.wordpress.com