I've got a class factory problem I'm trying to resolve and it appears I'm at a point where it's probably better to ask for help.
TCoreObjects=class; TCoreObject=Class (TPersistent) protected class procedure VerifyIDs(var Module:TDBMSModule); Virtual; abstract; end; TAdminCore=Class(TCoreObject) protected class procedure VerifiyIDs(var Module:TDBMSModule); override; end; <SNIP> procedure VerifyIDs(Var Module:TDBMSModule); var iLcv:integer; ItemP:PCoreObjectItem; // Just record storing classname to load and (each core object implment is loaded just not detailed here for simplicity) coGeneric:TPersistentClass; coItem:TCoreObject; begin for iLcv:=0 to High(CoreObjectItems) do begin ItemP:=CoreObjectItems[iLcv]; coGeneric:=GetClass(ItemP^.ClassName); if (coGeneric<>nil) and coGeneric.InheritsFrom(TCoreObject) then begin coItem:=coGeneric as TCoreObject << COMPILER ERROR :-( TPersistentClass(coItem):=coGeneric; << Compiles but get Runtime Error coItem.VerifyIDs(Module); < CRASH @ RUNTIME end; end; end; How can I get each class's implement of VerifyIDs to get called as each one is different but yet single. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal