Re: [fpc-pascal] Problem accessing Class Method with abstraction

2010-10-17 Thread Andrew Hall
The reason you cannot call VerifyID's from coGeneric is that the compiler sees coGeneric as a TPersistentClass which does not implement the VerifyIDs method. The following changes will give you the desired result... type TCoreObjectClass = class of TCoreObject; If (coGeneric<>nil) and coGe

Re: [fpc-pascal] Problem accessing Class Method with abstraction

2010-10-17 Thread Andrew Brunner
procedure VerifyIDs(Var Module:TDBMSModule); var iLcv:integer; ItemP:PCoreObjectItem; coGeneric:TPersistentClass; coItem:TCoreObject; begin for iLcv:=0 to High(CoreObjectItems) do begin ItemP:=CoreObjectItems[iLcv]; coGeneric:=GetClass(ItemP^.ClassName); if (coGeneric<>nil) an

Re: [fpc-pascal] Problem accessing Class Method with abstraction

2010-10-17 Thread Andrew Brunner
On Sun, Oct 17, 2010 at 3:33 AM, Michael Van Canneyt wrote: // Revised code CCoreObject=Class(TCoreObject); TCoreObjects=class; TCoreObject=Class (TPersistent)  protected   class procedure VerifyIDs(var Module:TDBMSModule); Virtual; abstract;  end;  TAdminCore=Class(TCoreObject)  protected

Re: [fpc-pascal] Problem accessing Class Method with abstraction

2010-10-17 Thread Michael Van Canneyt
On Sat, 16 Oct 2010, Andrew Brunner wrote: 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); Vi

Re: [fpc-pascal] Problem accessing Class Method with abstraction

2010-10-17 Thread patspiper
On 10/17/2010 05:54 AM, Andrew Brunner wrote: 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:TDBMSMod