Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-12

lack tForm.OldCreateOrder

10 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Darek Mazur

Hi
In Lazarus is absent in tForm property OLDCREATEORDER, this property may do nothing
this is need only when is LRS loaded - Delphi DFM have that

Darek

Reply by email

Unknown author
to Darek Mazur
Mattias Gaertner wrote 9 lines
On Tue, 16 Dec 2003 19:17:22 +0100 "Darek Mazur" wrote: BTW, your workaround for the ident2int function works nice. The IDE also needs this feature. Although it would be even better, if there are functions to read/use the ident2int function list from outside classes.pp. Then the IDE would be able to examine component streams without actually creating objects.

If I need to change anything in the FCL/Classes, let me know.

Currently the following functions exist:

procedure RegisterIntegerConsts(IntegerType: Pointer; IdentToIntFn: TIdentToInt; IntToIdentFn: TIntToIdent);
function IdentToInt(const Ident: string; var Int: Longint; const Map: array of TIdentMapEntry): Boolean;
function IntToIdent(Int: Longint; var Ident: string; const Map: array of TIdentMapEntry): Boolean;

If I need to add some functions, let me know.

Michael.

Reply by email

Mattias Gaertner
to Darek Mazur: Hi In Lazarus is absent in tForm property OLDCREATEORDER, this property may do nothing…
Show quoted text 16 lines
>> > BTW, your workaround for the ident2int function works nice. >> > The IDE also needs this feature. Although it would be even better, if >> > there are functions to read/use the ident2int function list from >> outside >> > classes.pp. >> > >> > Then the IDE would be able to examine component streams without >> actually >> > creating objects. >> >> If I need to change anything in the FCL/Classes, let me know. > > One thing: Why uses the fcl include files of the rtl (tthread.inc)? It does not use include rtl files. The fcl/classes unit is only for 1.0.x, see the Makefile.fpc. For 1.9.x the classes unit is in the rtl.

Eh. Ok, then my 1.9 cvs is broken. Both, the fcl and the rtl contains many classes.pp. I used 'cvs -z3 checkout fpc' without any tag. How do I get the current 1.9?

Mattias

Reply by email

Mattias Gaertner
to Darek Mazur: Hi In Lazarus is absent in tForm property OLDCREATEORDER, this property may do nothing…
Show quoted text 14 lines
> > Hi > > In Lazarus is absent in tForm property OLDCREATEORDER, > > this property may do nothing > > this is need only when is LRS loaded - Delphi DFM have that > > I don't think that we should add nope properties/methods. > Maybe someone can finish the Delphi to lazarus unit converter and implement > a basic wizard to simply remove unknown properties. Maybe so, but I see two trouble. First is very hard to avoid unknown properties for descendant of tForm etc.

Can you give an example?

Second this not solve incompatibility on source level with Delphi.

I think, we can add the property with a comment, why it exists. Although IMO it is a very minor compatibility improvement, while OTOH it can confuse users. So, I see a small pro and some small cons.

At the moment it is quite hard to write code, that works with LCL and VCL. And a single missing property is the easy part.
The files are called .lfm and not .dfm, although they have the same syntax. The reason is, because we know, that the fcl/lcl will never have exactly the same properties as their VCL counterparts.
And some day, the IDE might be powerful enough to work with dfm and lfm files, so VCL/LCL source combination might become true.

And even simply wizard is not so simply like changes of code.

In this case, it is very simple. (I implemented it). We need this wizard anyway. One problem of Delphi is, that everytime you upgrade to a newer Delphi Version, you get warnings and automatic updates for your projects. Downgrading even only one version is difficult. Here we need this wizard.
And Lazarus should be able to make porting Delphi applications of nearly all versions easy.
So, this wizard is essential.

But this all is only my suggestion.

Always welcome.

BTW, your workaround for the ident2int function works nice. The IDE also needs this feature. Although it would be even better, if there are functions to read/use the ident2int function list from outside classes.pp.

Then the IDE would be able to examine component streams without actually creating objects.

Mattias

Reply by email

Mattias Gaertner
to Darek Mazur: Hi In Lazarus is absent in tForm property OLDCREATEORDER, this property may do nothing…
Show quoted text 16 lines
On Tue, 16 Dec 2003, Mattias Gaertner wrote: > On Tue, 16 Dec 2003 19:17:22 +0100 "Darek Mazur" > wrote: > > BTW, your workaround for the ident2int function works nice. > The IDE also needs this feature. Although it would be even better, if > there are functions to read/use the ident2int function list from outside > classes.pp. > > Then the IDE would be able to examine component streams without actually > creating objects. If I need to change anything in the FCL/Classes, let me know.

One thing: Why uses the fcl include files of the rtl (tthread.inc)?

Show quoted text 9 lines
Currently the following functions exist: procedure RegisterIntegerConsts(IntegerType: Pointer; IdentToIntFn: TIdentToInt; IntToIdentFn: TIntToIdent); function IdentToInt(const Ident: string; var Int: Longint; const Map: array of TIdentMapEntry): Boolean; function IntToIdent(Int: Longint; var Ident: string; const Map: array of TIdentMapEntry): Boolean; If I need to add some functions, let me know.

Something like this would be nice:

function GetIdentToIntListCount: integer;
procedure GetIdentToIntFunction(ListIndex: integer;
  var IntegerType: PTypeInfo;
  var IdentToIntFn: TIdentToInt;
  var IntToIdentFn: TIntToIdent);

Mattias

Reply by email

Mattias Gaertner
to Darek Mazur: Hi In Lazarus is absent in tForm property OLDCREATEORDER, this property may do nothing…
Show quoted text 15 lines
>> >> If I need to change anything in the FCL/Classes, let me know. >> > >> > One thing: Why uses the fcl include files of the rtl (tthread.inc)? >> >> It does not use include rtl files. The fcl/classes unit is only for >> 1.0.x, >> see the Makefile.fpc. For 1.9.x the classes unit is in the rtl. > > Eh. Ok, then my 1.9 cvs is broken. Both, the fcl and the rtl contains > many classes.pp. I used 'cvs -z3 checkout fpc' without any tag. > How do I get the current 1.9? Use the -A option for update: cvs -z3 up -P -d -A fpc

Done.

[]$ find . | grep classes.p
./compiler/cclasses.pas
./fcl/amiga/classes.pp
./fcl/beos/classes.pp
./fcl/classes/freebsd/classes.pp
./fcl/classes/go32v2/classes.pp
./fcl/classes/linux/classes.pp
./fcl/classes/netbsd/classes.pp
./fcl/classes/openbsd/classes.pp
./fcl/classes/os2/classes.pp
./fcl/classes/win32/classes.pp
./fcl/qnx/classes.pp
./fcl/sunos/classes.pp
./fcl/template/classes.pp
./rtl/freebsd/classes.pp
./rtl/go32v2/classes.pp
./rtl/linux/classes.pp
./rtl/netbsd/classes.pp
./rtl/netware/classes.pp
./rtl/openbsd/classes.pp
./rtl/os2/classes.pp
./rtl/watcom/classes.pp
./rtl/win32/classes.pp

:(

Mattias

Reply by email

Peter Vreman
to Darek Mazur: Hi In Lazarus is absent in tForm property OLDCREATEORDER, this property may do nothing…
Show quoted text 11 lines
> >> If I need to change anything in the FCL/Classes, let me know. > > > > One thing: Why uses the fcl include files of the rtl (tthread.inc)? > > It does not use include rtl files. The fcl/classes unit is only for > 1.0.x, > see the Makefile.fpc. For 1.9.x the classes unit is in the rtl. Eh. Ok, then my 1.9 cvs is broken. Both, the fcl and the rtl contains many classes.pp. I used 'cvs -z3 checkout fpc' without any tag. How do I get the current 1.9?

Use the -A option for update:

cvs -z3 up -P -d -A fpc

Reply by email

Darek Mazur
to Darek Mazur: Hi In Lazarus is absent in tForm property OLDCREATEORDER, this property may do nothing…
Show quoted text 7 lines
> Hi > In Lazarus is absent in tForm property OLDCREATEORDER, > this property may do nothing > this is need only when is LRS loaded - Delphi DFM have that I don't think that we should add nope properties/methods. Maybe someone can finish the Delphi to lazarus unit converter and

implement

a basic wizard to simply remove unknown properties.

Maybe so, but I see two trouble. First is very hard to avoid unknown properties for descendant of tForm etc. Second this not solve incompatibility on source level with Delphi. And even simply wizard is not so simply like changes of code. But this all is only my suggestion.

Darek

Reply by email

Peter Vreman
to Darek Mazur: Hi In Lazarus is absent in tForm property OLDCREATEORDER, this property may do nothing…
Show quoted text 13 lines
> > BTW, your workaround for the ident2int function works nice. > > The IDE also needs this feature. Although it would be even better, if > > there are functions to read/use the ident2int function list from > outside > > classes.pp. > > > > Then the IDE would be able to examine component streams without > actually > > creating objects. > > If I need to change anything in the FCL/Classes, let me know. One thing: Why uses the fcl include files of the rtl (tthread.inc)?

It does not use include rtl files. The fcl/classes unit is only for 1.0.x, see the Makefile.fpc. For 1.9.x the classes unit is in the rtl.

Reply by email