>Hi all
>
>Is there a hack that I can do do transfer PEMs from a class to another as I have added stuff to the wrong level of the class hierarchy and redoing is possible but if I can hack stuff to the right class that will be better.
>
>Please suggest.
Clipboard suggested.
Seriously, unless there's ton of PEMs that you want to move up, the best you can do is to just create them in the parent class, then copy their definition from the subclass. Going in the other direction would just require moving them from parent and in the end removing these PEMs from parent (but then you need to check the child's Reserved3 or which memo was it where the extra PEMs are listed - make sure they are).
A hack I think may work would involve opening both classes at the same time, which just wouldn't work because one is parent to the other. But then we only need to copy things from one to another - which means we can open a copy of the child, which would inherit from a copy of the parent (and the rest of upwards hierarchy), easily done if these copies are in a discardable copy of the class lib directory.
Then you'd have a reference to the parent and child as edited objects, builder style, and then
n=aMembers(aPem, oChild, "UC")
for i=1 to n
do case
case ThisIsAProperty
oDad.addproperty(aPem[i,2], getpem(oChild, aPem[i,2]))
case ThisIsCode
oDad.WriteMethod(aPem[i,2], oChild.ReadMethod(aPem[i,2]), .t.)
case ThisIsAMemberObject
endcase
endfor
Close, save, kick yourself in the head if you didn't backup first.