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
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
Hi
I have a program that creates a TInterfacedObject and nothing else.
program project1;
{$mode objfpc}{$H+}
uses
Classes;
var
io: TInterfacedObject;
begin
io := TInterfacedObject.Create;
end.
I compile it with -gh (heap trace) and get the following output:
[DBGTGT] Heap dump by hea
In our previous episode, Juha Manninen (gmail) said:
> I have a program that creates a TInterfacedObject and nothing else.
>
> program project1;
> {$mode objfpc}{$H+}
> uses
> Classes;
> var
io: IUnknown;
> begin
> io := TInterfacedObject.Create;
> end.
Try the above program.
> If
17.10.2010 21:31, Juha Manninen (gmail) wrote:
program project1;
{$mode objfpc}{$H+}
uses
Classes;
var
io: TInterfacedObject;
begin
io := TInterfacedObject.Create;
end.
Try the same but replace io type to IUnknown.
Best regards,
Paul Ishenin.
__
On Sunday 17 October 2010 15:01:37 Paul Ishenin wrote:
> Try the same but replace io type to IUnknown.
Thanks Marco and Paul. I should have known this one.
Regards,
Juha
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal
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
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
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
On Thu, Oct 14, 2010 at 11:21 AM, Michael Van Canneyt <
mich...@freepascal.org> wrote:
>
>
> On Thu, 14 Oct 2010, Frank Church wrote:
>
> Can variables be declared within a begin end block?
>>
>
> No.
>
That found in Gnu Pascal
Can we ask to be feature request?
Thanks
--
Zaher Dirkey
_
Am 18.10.2010 08:17, schrieb Zaher Dirkey:
>
>
> On Thu, Oct 14, 2010 at 11:21 AM, Michael Van Canneyt
> mailto:mich...@freepascal.org>> wrote:
>
>
>
> On Thu, 14 Oct 2010, Frank Church wrote:
>
> Can variables be declared within a begin end block?
>
>
> No.
>
>
> That fou
11 matches
Mail list logo