Sign in Join

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

Mailing lists / lazarus / 2003-07

New Bug Entered

47 messages · 9 people ·

Reply by email Subscribe to this list Your subscription

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

Mattias Gaertner
to Unknown author: Title: TProcess: Could not create pipe Entered by: Tom Lisjac If poUsePipes is set as an…
Show quoted text 10 lines
Title: TProcess: Could not create pipe Entered by: Tom Lisjac If poUsePipes is set as an option in TProcess, a \"Could not create pipe\" exception is thrown after several hundred calls. Removing poUsePipes or commenting out the CreateStreams and 3 fileclose statements in TProcess.execute makes the problem go away... along with access to the streams. I\'ve tried but haven\'t had any success fixing this.

Eh. This is a FCL bug. The freepascal website has a bugtracker.

Mattias

Show quoted text 27 lines
The following code will reproduce the problem with a TProcess, button and edit on the form: procedure TForm1.Button1CLICK(Sender: TObject); var i:Integer; begin With Process1 do Begin commandline:=\'ls\'; options:=[pousepipes,ponoconsole]; For I:=1 to 50000 do Begin edit1.text:=inttostr(i); active:=true; WaitonExit; end End end; _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Unknown author

Title: TProcess: Could not create pipe

Entered by: Tom Lisjac

If poUsePipes is set as an option in TProcess, a \"Could not create pipe\" exception is thrown after several hundred calls. Removing poUsePipes or commenting out the CreateStreams and 3 fileclose statements in TProcess.execute makes the problem go away... along with access to the streams. I\'ve tried but haven\'t had any success fixing this.

The following code will reproduce the problem with a TProcess, button and edit on the form:

procedure TForm1.Button1CLICK(Sender: TObject);
var i:Integer;
begin
  With Process1 do
    Begin
      commandline:=\'ls\';
      options:=[pousepipes,ponoconsole];
      For I:=1 to 50000 do
        Begin
          edit1.text:=inttostr(i);
          active:=true;
          WaitonExit;
        end
    End
end;
Unknown author

Title: TDatamodule OnCreate never fires

Entered by: Tom Lisjac

Tom Lisjac
to Unknown author
Title: TDatamodule OnCreate never fires

Oops... bumped return before I finished typing the description.

The OnCreate event doesn't fire no matter what the state of OldCreateOrder. Creating the DM executes the TDataModule.Create constructor but OldCreateOrder test is always false even if set true in the property editor.

Unknown author

Title: .lpi is not a historic file

Entered by: mapelo

freepascal pre1.08
Linux

Description:

1- Create a new proyect (application).
2- Create two units called, for example, unit1 (for form1) and unit2 (no form). 3.- Save de proyect (call it proyect1) and exit.

Now, open Lazarus and Load the proyect1:
1.- Remove from proyect (Proyect->Remove form proyect) the unit2.pas 2.- Close the unit2 from Lazarus Editor
2.- Save the proyect1.

The bug: you can see into proyect1.lpi, because Lazarus do not delete the reference for the unit2. There is no problem, because the proyect run OK, but if you are programing a big application, the .lpi shows all the unit you deleted. The .lpi is a historic file????

Manuel Pérez López
to Unknown author: Title: bug in TRadiogroup Entered by: mapelo if you create a Radiogroup1 into a form, then

El Jueves, 10 de Julio de 2003 13:13, escribi�:

Show quoted text 9 lines
Title: bug in TRadiogroup Entered by: mapelo if you create a Radiogroup1 into a form, then Radiogroup1.Items.Add(\'anything\'); does not work (no error, but no insert item)

I can add items from a FormCREATE event to the RadioGroup, but it's not possible from a Button1CLICK event, for example. This is a new bug, because I remember that this worked right.

--- Saludos Manuel P�rez L�pez
Unknown author

Title: bug in TRadiogroup

Entered by: mapelo

if you create a Radiogroup1 into a form, then
Radiogroup1.Items.Add(\'anything\');

does not work (no error, but no insert item)

Unknown author

Title: DataModule doubleclick

Entered by: Dominik Zablotny

Accidental doubleclick on datamodule view (designer) gives a message
\"TComponentInterface.GetDesigner DataModule1 Owner = nil\" I\'ts annoing because \"cancel\" makes lazarus halt.

Michael Van Canneyt
to Mattias Gaertner: On Mon, 14 Jul 2003 14:38:50 +0200 (W. Europe Daylight Time) Why that? Why do you think,…
Mattias Gaertner wrote 53 lines
On Mon, 14 Jul 2003 14:38:50 +0200 (W. Europe Daylight Time) Michael Van Canneyt wrote: > > > On Mon, 14 Jul 2003, Mattias Gaertner wrote: > > > On Sun, 13 Jul 2003 18:28:08 -0400 > > wrote: > > > > > > > > Title: Datamodule generates AV on Lazarus exit > > > > > > Entered by: Tom Lisjac > > > > > > When a datamodule is renamed, OldCreateOrder is set and OnCreate and > > > OnDestroy events exist, Lazarus will AV upon exit with 1.0.10. Here > > > are the steps to reproduce: > > > > > > Bring up Lazarus in a new project. > > > Add a datamodule with File | New | Datamodule > > > With Property editor: > > > Rename the datamodule to dmt > > > Set OldCreationOrder to True > > > Create empty OnCreate and OnDestroy event handlers > > > Exiting Lazarus (saving or not) generates an AV > > > > > > This problem appeared after upgrading to 1.0.10 in a datamodule that > > > had been working fine with 1.0.7. > > > > Now, there you found a difficult thing. I always wonder, when it will > > appear. The IDE creates datamodule/forms descendents on the fly. That > > means, it really creates new classes and > > procedures are empty and do nothing. The current trick is to copy an > > empty procedure. I was always sure, that this will give us trouble, as > > soon as the caller checks the stack or uses some special calling > > convention. Now you find an example: > > > > try > > AnEvent(Self); > > except > > end; > > > > When the 'except' frees the exception frame, it runs into trouble > > (internal error). > > I have commented the try..except in the LCL, so this error is hidden. > > One correct solution is to create better "empty procedures". This means > > an empty procedure, with the right length of parameters. I'm not sure > > how to do this for all kinds of calling conventions and processors. > > You can't. Why that?

Because the callee clears the stack. This is unlike C, where the caller knows how much is pushed on the stack, and removes exactly this amount. in FPC, the caller expects a certain amount on the stack, and removes this amount from the stack, irrespective of whether this amount was indeed pushed or not.

Show quoted text 35 lines
> > Another solution is to simulate procedures. That means the procedures > > are not really set. But this requires changing TReader/TWriter to handle > > fake events and the RTTI will be incomplete. > > I prefer the first solution. > > > > Maybe a fpc guru can give me a hint. > > Before destroying your instances, all methods should simply be set to nil. > This is OK as long as it happens after the form file was written. Why do you think, the problem is only the destructor? Maybe this helps: When the IDE creates an event (reading a form or user creates a new event) it needs a TMethod record. That means the Self pointer "Data" and the procedure address "Code". Because the FCL and the RTTI uses the Code to identify a procedure, every event needs a unique procedure. The IDE uses a dirty trick and allocates a few bytes and copies the code from an empty method. Because the empty method has no parameters, it is, strictly speaking, only compatible to events without parameters. In fact it is something like this: MyDataModule.AnNotifyEvent:=TNotifyEvent(@MyDataModule.SimpleProc); A simple AnNotifyEvent(Self) works (at least on i386). But a try AnNotifyEvent(Self); except end; does not work.

Of course not, since the stack is messed up.
The exact error will depend on the particular code.

The way I see it is that during design time, NO callbacks may be set. This also means that you must
- After form load, replace all filled in event handlers with nil, and keep a record of this.
- In the object inspector, show the 'fake' record which you saved.
- When creating new events, put them in fake records.
- Before form saving, fill all callbacks again
- after form saving clear them again.

The best way of doing it IMHO is to make descendents of the TReader/TWriter which do this automatically, and which also keep the list of 'fake' records.

Michael.

Michael Van Canneyt
to Mattias Gaertner: On Sun, 13 Jul 2003 18:28:08 -0400 Now, there you found a difficult thing. I always…
Mattias Gaertner wrote 42 lines
On Sun, 13 Jul 2003 18:28:08 -0400 wrote: > > Title: Datamodule generates AV on Lazarus exit > > Entered by: Tom Lisjac > > When a datamodule is renamed, OldCreateOrder is set and OnCreate and > OnDestroy events exist, Lazarus will AV upon exit with 1.0.10. Here are > the steps to reproduce: > > Bring up Lazarus in a new project. > Add a datamodule with File | New | Datamodule > With Property editor: > Rename the datamodule to dmt > Set OldCreationOrder to True > Create empty OnCreate and OnDestroy event handlers > Exiting Lazarus (saving or not) generates an AV > > This problem appeared after upgrading to 1.0.10 in a datamodule that had > been working fine with 1.0.7. Now, there you found a difficult thing. I always wonder, when it will appear. The IDE creates datamodule/forms descendents on the fly. That means, it really creates new classes and procedures are empty and do nothing. The current trick is to copy an empty procedure. I was always sure, that this will give us trouble, as soon as the caller checks the stack or uses some special calling convention. Now you find an example: try AnEvent(Self); except end; When the 'except' frees the exception frame, it runs into trouble (internal error). I have commented the try..except in the LCL, so this error is hidden. One correct solution is to create better "empty procedures". This means an empty procedure, with the right length of parameters. I'm not sure how to do this for all kinds of calling conventions and processors.

You can't.

Show quoted text 6 lines
Another solution is to simulate procedures. That means the procedures are not really set. But this requires changing TReader/TWriter to handle fake events and the RTTI will be incomplete. I prefer the first solution. Maybe a fpc guru can give me a hint.

Before destroying your instances, all methods should simply be set to nil. This is OK as long as it happens after the form file was written.

Michael.

Mattias Gaertner
to Mattias Gaertner: On Mon, 14 Jul 2003 16:13:33 +0200 (W. Europe Daylight Time) Then you mean: You don't see…
Show quoted text 59 lines
On Mon, 14 Jul 2003, Mattias Gaertner wrote: > On Mon, 14 Jul 2003 16:13:33 +0200 (W. Europe Daylight Time) > Michael Van Canneyt wrote: > > > [..] > > > > > One correct solution is to create better "empty procedures". > > > > > This means an empty procedure, with the right length of > > > > > parameters. I'm not sure how to do this for all kinds of calling > > > > > conventions and processors. > > > > > > > > You can't. > > > > > > Why that? > > > > Because the callee clears the stack. This is unlike C, where the > > caller knows how much is pushed on the stack, and removes exactly this > > amount. in FPC, the caller expects a certain amount on the stack, and > > removes this amount from the stack, irrespective of whether this > > amount was indeed pushed or not. > > Then you mean: You don't see a way to do this easily. > It will only be impossible, when a processor does not allow to execute > code in data mem. Yes, but implementing such things is very bad coding IMHO. > > > > [..] > > > MyDataModule.AnNotifyEvent:=TNotifyEvent(@MyDataModule.SimpleProc > > > ); > > > > > > A simple > > > > > > AnNotifyEvent(Self) > > > > > > works (at least on i386). But a > > > > > > try > > > AnNotifyEvent(Self); > > > except > > > end; > > > > > > does not work. > > > > Of course not, since the stack is messed up. > > The exact error will depend on the particular code. > > > > The way I see it is that during design time, NO callbacks may be set. > > Right. But NO really means NO. If an event is set at any time, it can be > called and destroy the stack. Normally not, as the compiler should do type cheking on assignment statements. It's only because this 'TMethod' record is used that the type checking is lost.

Yes, and therefore we can't set/unset events for reading/writing.

Show quoted text 20 lines
> > This also means that you must > > - After form load, replace all filled in event handlers with nil, and > > keep a record of this. > > - In the object inspector, show the 'fake' record which you saved. > > - When creating new events, put them in fake records. > > - Before form saving, fill all callbacks again > > - after form saving clear them again. > > > > The best way of doing it IMHO is to make descendents of the > > TReader/TWriter which do this automatically, and which also keep the > > list of 'fake' records. > > Ok. > There are enough other good reasons to improve TReader/TWriter (better > error handling, interactive reading). But Borland wrote TReader/TWriter > in a very closed way. Not enough virtual methods and it uses a lot of > private variables. Of course we can use the workarounds you mentioned, > but it would be much nicer, to open TReader/TWriter for extensions. I'm all for that. Feel free to propose/implement improvements.

I'm busy at the moment. I will have time for that in a month. I hope lazarus will then also work again with fpc 1.1.

Mattias

Tom Lisjac
to Unknown author: Title: Datamodule generates AV on Lazarus exit Entered by: Tom Lisjac When a datamodule…
>That DM and the empty example I submitted What example?

The steps to recreate the problem that I described in the bug report.

Does this mean, you don't get the AV, when closing a designer form?

Yes, in addition to exiting Lazarus, any attempt to close the datamodule in the IDE also causes the AV.

I worked up the minimal example in the hopes that it would make the AV easy to reproduce. I didn't consider the blank event handlers to be significant because the original problem was seen in a datamodule that didn't have any empty procedures. The unit is tiny... I'll be happy to send it to you if you'd like to take a

Unknown author

Title: lcl units not delphi compatible

Entered by: Peter

There is no GraphType unit in Delphi.
Please move GraphType functions to
Graphics unit. Otherwise, you have to
write:

uses
{$IFDEF FPC}
GraphType,
{$ENDIF}
Graphics;
Mattias Gaertner
to Mattias Gaertner: On Mon, 14 Jul 2003 14:38:50 +0200 (W. Europe Daylight Time) Why that? Why do you think,…
Show quoted text 15 lines
[..] > > > One correct solution is to create better "empty procedures". This > > > means an empty procedure, with the right length of parameters. I'm > > > not sure how to do this for all kinds of calling conventions and > > > processors. > > > > You can't. > > Why that? Because the callee clears the stack. This is unlike C, where the caller knows how much is pushed on the stack, and removes exactly this amount. in FPC, the caller expects a certain amount on the stack, and removes this amount from the stack, irrespective of whether this amount was indeed pushed or not.

Then you mean: You don't see a way to do this easily. It will only be impossible, when a processor does not allow to execute code in data mem.

Show quoted text 20 lines
[..] > MyDataModule.AnNotifyEvent:=TNotifyEvent(@MyDataModule.SimpleProc); > > A simple > > AnNotifyEvent(Self) > > works (at least on i386). But a > > try > AnNotifyEvent(Self); > except > end; > > does not work. Of course not, since the stack is messed up. The exact error will depend on the particular code. The way I see it is that during design time, NO callbacks may be set.

Right. But NO really means NO. If an event is set at any time, it can be called and destroy the stack.

Show quoted text 11 lines
This also means that you must - After form load, replace all filled in event handlers with nil, and keep a record of this. - In the object inspector, show the 'fake' record which you saved. - When creating new events, put them in fake records. - Before form saving, fill all callbacks again - after form saving clear them again. The best way of doing it IMHO is to make descendents of the TReader/TWriter which do this automatically, and which also keep the list of 'fake' records.

Ok.
There are enough other good reasons to improve TReader/TWriter (better error handling, interactive reading). But Borland wrote TReader/TWriter in a very closed way. Not enough virtual methods and it uses a lot of private variables. Of course we can use the workarounds you mentioned, but it would be much nicer, to open TReader/TWriter for extensions.

Mattias

Unknown author

Title: TButton is declared in StdCtrls not Buttons since Delphi 6

Entered by: Peter

Unknown author

Title: const clCream is missing

Entered by: Peter

clCream = TColor($00F0FBFF);

is new since D7

Mattias Gaertner
to Unknown author: Title: Datamodule generates AV on Lazarus exit Entered by: Tom Lisjac When a datamodule…
Show quoted text 8 lines
> That means, > it really creates new classes and > procedures are empty and do nothing. The current trick is to copy an > empty procedure. I see what you're saying but I'm wondering if that's the problem we're seeing here. The original datamodule had a TTimer on it and code in both OnCreate and OnDestroy. That DM and the empty example I submitted

What example?

both run fine... but both cause AV's if they are open in the IDE when shutting Lazarus down.

Does this mean, you don't get the AV, when closing a designer form?

Mattias

Michael Van Canneyt
to Mattias Gaertner: On Mon, 14 Jul 2003 16:13:33 +0200 (W. Europe Daylight Time) Then you mean: You don't see…
Mattias Gaertner wrote 22 lines
On Mon, 14 Jul 2003 16:13:33 +0200 (W. Europe Daylight Time) Michael Van Canneyt wrote: > [..] > > > > One correct solution is to create better "empty procedures". This > > > > means an empty procedure, with the right length of parameters. I'm > > > > not sure how to do this for all kinds of calling conventions and > > > > processors. > > > > > > You can't. > > > > Why that? > > Because the callee clears the stack. This is unlike C, where the caller > knows how much is pushed on the stack, and removes exactly this amount. > in FPC, the caller expects a certain amount on the stack, and removes > this amount from the stack, irrespective of whether this amount was > indeed pushed or not. Then you mean: You don't see a way to do this easily. It will only be impossible, when a processor does not allow to execute code in data mem.

Yes, but implementing such things is very bad coding IMHO.

Show quoted text 25 lines
> [..] > > MyDataModule.AnNotifyEvent:=TNotifyEvent(@MyDataModule.SimpleProc); > > > > A simple > > > > AnNotifyEvent(Self) > > > > works (at least on i386). But a > > > > try > > AnNotifyEvent(Self); > > except > > end; > > > > does not work. > > Of course not, since the stack is messed up. > The exact error will depend on the particular code. > > The way I see it is that during design time, NO callbacks may be set. Right. But NO really means NO. If an event is set at any time, it can be called and destroy the stack.

Normally not, as the compiler should do type cheking on assignment statements. It's only because this 'TMethod' record is used that the type checking is lost.

Show quoted text 18 lines
> This also means that you must > - After form load, replace all filled in event handlers with nil, and > keep a record of this. > - In the object inspector, show the 'fake' record which you saved. > - When creating new events, put them in fake records. > - Before form saving, fill all callbacks again > - after form saving clear them again. > > The best way of doing it IMHO is to make descendents of the > TReader/TWriter which do this automatically, and which also keep the > list of 'fake' records. Ok. There are enough other good reasons to improve TReader/TWriter (better error handling, interactive reading). But Borland wrote TReader/TWriter in a very closed way. Not enough virtual methods and it uses a lot of private variables. Of course we can use the workarounds you mentioned, but it would be much nicer, to open TReader/TWriter for extensions.

I'm all for that. Feel free to propose/implement improvements.

Michael.

Unknown author

Title: Datamodule generates AV on Lazarus exit

Entered by: Tom Lisjac

When a datamodule is renamed, OldCreateOrder is set and OnCreate and OnDestroy events exist, Lazarus will AV upon exit with 1.0.10. Here are the steps to reproduce:

Bring up Lazarus in a new project.
Add a datamodule with File | New | Datamodule
With Property editor:
Rename the datamodule to dmt
Set OldCreationOrder to True
Create empty OnCreate and OnDestroy event handlers Exiting Lazarus (saving or not) generates an AV

This problem appeared after upgrading to 1.0.10 in a datamodule that had been working fine with 1.0.7.

Unknown author

Title: Foward class reference disables RTTI in property editor

Entered by: Tom Lisjac

Declaring a forward class reference for a component masks access to it in the property editor after it is installed. The component runs fine if manually initialized at runtime but the property editor is completely blank when viewing it in the IDE at design time. An example is attached that reproduces the problem.

A workaround that restores design time access is to remove the forward reference, declare generic pointers and typecast them where needed.

unit fwdtest;
interface
uses
  SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
type
  TMain = class;
  TMainXprops = class(TPersistent)
  private
    fParent:TMain;
    finteger:integer;
    fString: String;
  published
    property Parent :TMain read fParent write fParent;
    property AnInteger:Integer read finteger write finteger;
    property AString:String read fString write fString;
  end;
  TMain = class(TComponent)
  private
    fy:TMainXProps;
  Public
    Constructor Create(AOwner:TComponent); Override;
    Destructor Destroy; Override;
  published
    property testprop:TMainXProps read fy write fy;
  end;
procedure Register;
implementation
procedure Register;
begin
  RegisterComponents(\'Misc\', [TMain]);
end;

{ TMain }

constructor TMain.Create(AOwner: TComponent);
begin
  inherited;
  fy:=TMainXProps.Create;
end;
destructor TMain.Destroy;
begin
  fy.free;
  inherited;
end;
end.
Tom Lisjac
to Unknown author: Title: Datamodule generates AV on Lazarus exit Entered by: Tom Lisjac When a datamodule…
That means, it really creates new classes and procedures are empty and do nothing. The current trick is to copy an empty procedure.

I see what you're saying but I'm wondering if that's the problem we're seeing here. The original datamodule had a TTimer on it and code in both OnCreate and OnDestroy. That DM and the empty example I submitted both run fine... but both cause AV's if they are open in the IDE when shutting Lazarus down.

-Tom

Mattias Gaertner
to Unknown author: Title: Datamodule generates AV on Lazarus exit Entered by: Tom Lisjac When a datamodule…
Show quoted text 19 lines
Title: Datamodule generates AV on Lazarus exit Entered by: Tom Lisjac When a datamodule is renamed, OldCreateOrder is set and OnCreate and OnDestroy events exist, Lazarus will AV upon exit with 1.0.10. Here are the steps to reproduce: Bring up Lazarus in a new project. Add a datamodule with File | New | Datamodule With Property editor: Rename the datamodule to dmt Set OldCreationOrder to True Create empty OnCreate and OnDestroy event handlers Exiting Lazarus (saving or not) generates an AV This problem appeared after upgrading to 1.0.10 in a datamodule that had been working fine with 1.0.7.

Now, there you found a difficult thing. I always wonder, when it will appear. The IDE creates datamodule/forms descendents on the fly. That means, it really creates new classes and procedures
are empty and do nothing. The current trick is to copy an empty procedure. I was always sure, that this will give us trouble, as soon as the caller checks the stack or uses some special calling convention. Now you find an example:

try
  AnEvent(Self);
except
end;

When the 'except' frees the exception frame, it runs into trouble (internal error).
I have commented the try..except in the LCL, so this error is hidden. One correct solution is to create better "empty procedures". This means an empty procedure, with the right length of parameters. I'm not sure how to do this for all kinds of calling conventions and processors. Another solution is to simulate procedures. That means the procedures are not really set. But this requires changing TReader/TWriter to handle fake events and the RTTI will be incomplete.
I prefer the first solution.

Maybe a fpc guru can give me a hint.

Mattias

Mattias Gaertner
to Mattias Gaertner
Show quoted text 48 lines
On Mon, 14 Jul 2003, Mattias Gaertner wrote: > On Sun, 13 Jul 2003 18:28:08 -0400 > wrote: > > > > > Title: Datamodule generates AV on Lazarus exit > > > > Entered by: Tom Lisjac > > > > When a datamodule is renamed, OldCreateOrder is set and OnCreate and > > OnDestroy events exist, Lazarus will AV upon exit with 1.0.10. Here > > are the steps to reproduce: > > > > Bring up Lazarus in a new project. > > Add a datamodule with File | New | Datamodule > > With Property editor: > > Rename the datamodule to dmt > > Set OldCreationOrder to True > > Create empty OnCreate and OnDestroy event handlers > > Exiting Lazarus (saving or not) generates an AV > > > > This problem appeared after upgrading to 1.0.10 in a datamodule that > > had been working fine with 1.0.7. > > Now, there you found a difficult thing. I always wonder, when it will > appear. The IDE creates datamodule/forms descendents on the fly. That > means, it really creates new classes and > procedures are empty and do nothing. The current trick is to copy an > empty procedure. I was always sure, that this will give us trouble, as > soon as the caller checks the stack or uses some special calling > convention. Now you find an example: > > try > AnEvent(Self); > except > end; > > When the 'except' frees the exception frame, it runs into trouble > (internal error). > I have commented the try..except in the LCL, so this error is hidden. > One correct solution is to create better "empty procedures". This means > an empty procedure, with the right length of parameters. I'm not sure > how to do this for all kinds of calling conventions and processors. You can't.

Why that?

Show quoted text 9 lines
> Another solution is to simulate procedures. That means the procedures > are not really set. But this requires changing TReader/TWriter to handle > fake events and the RTTI will be incomplete. > I prefer the first solution. > > Maybe a fpc guru can give me a hint. Before destroying your instances, all methods should simply be set to nil. This is OK as long as it happens after the form file was written.

Why do you think, the problem is only the destructor? Maybe this helps:
When the IDE creates an event (reading a form or user creates a new event) it needs a TMethod record. That means the Self pointer "Data" and the procedure address "Code". Because the FCL and the RTTI uses the Code to identify a procedure, every event needs a unique procedure. The IDE uses a dirty trick and allocates a few bytes and copies the code from an empty method.
Because the empty method has no parameters, it is, strictly speaking, only compatible to events without parameters. In fact it is something like this:

  MyDataModule.AnNotifyEvent:=TNotifyEvent(@MyDataModule.SimpleProc);

A simple

AnNotifyEvent(Self)

works (at least on i386). But a

try
  AnNotifyEvent(Self);
except
end;

does not work.

Mattias

Marc Weustink
to Unknown author: Title: TButton is declared in StdCtrls not Buttons since Delphi 6 Entered by: Peter
Mattias Gaertner wrote 8 lines
On Sat, 19 Jul 2003 14:05:23 -0400 wrote: > > Title: TButton is declared in StdCtrls not Buttons since Delphi 6 Why that? It seems more logical in buttons.pp. What do others think?

I think both have some logic (TBUtton IMO is a pretty standard control).

In every new version of Delphi, Borland has moved some code from one unit to another. IMO, if we self don't have a reason for it, we shouldn't move. In both cases you are not compatible with a version of Delphi.

If ppl. want to share code between Delphi and Lazarus they have to use IFDEFs. The same way if one wants to share code between D6 and D7

Marc

Unknown author

Title: Update procedure from TForm is missing

Entered by: tom

{$IFNDEF FPC}
  Form.Update;
{$ENDIF}
Unknown author

Title: There is no Action property in TToolButton

Entered by: tom

{$IFNDEF FPC}
  ToolButton1.Action := actMyAction;
{$ENDIF}
property Action: TBasicAction;
Unknown author

Title: There is no TPageControl, TTabSheet

Entered by: tom

{$IFNDEF FPC}
PageControl1: TPageControl;
TabSheet1: TTabSheet;
{$ENDIF}
Dominik Zablotny
to Unknown author: Title: There is no TPrinterSetupDialog Entered by: tom {$IFNDEF FPC} PrinterSetupDialog1:…
Not yet. Any ideas how this should be done and/or what we need for it?

The best would be like in Delphi.
In Windows the native way of course. In posix we need TCanvas descendant that generate postscript file. There's something simmillar in libgnomeprint
- http://developer.gnome.org/arch/imaging/printing.html, but it seems to be specific to gnome-canvas. The printing system choice is secondary issue. Anyway, it won't be easy.

Dominik Zablotny
Unknown author

Title: There is no Tracking property in TScrollbox

Entered by: tom

{$IFNDEF FPC}
  ScrollBox1.HorzScrollBar.Tracking:=true;
{$ENDIF}
Unknown author

Title: There is no TPrinterSetupDialog

Entered by: tom

{$IFNDEF FPC}
    PrinterSetupDialog1: TPrinterSetupDialog;
{$ENDIF}
Mattias Gaertner
to Unknown author: Title: lcl units not delphi compatible Entered by: Peter There is no GraphType unit in…
Show quoted text 15 lines
Title: lcl units not delphi compatible Entered by: Peter There is no GraphType unit in Delphi. Please move GraphType functions to Graphics unit. Otherwise, you have to write: uses {$IFDEF FPC} GraphType, {$ENDIF} Graphics;

If I remember correct, Michal Bukovjan splitted it up. This split breaks some circles.
Maybe some of the types can be moved to graphics.pp.

Mattias

Unknown author

Title: There is no SizeGrip property in TStatusbar

Entered by: tom

{$IFNDEF FPC}
  StatusBar1.SizeGrip := true;
{$ENDIF}
Unknown author

Title: There is no AutoComplete property in TComboBox

Entered by: tom

{$IFNDEF FPC}
ComboBox1.AutoComplete := false;
{$ENDIF}
Michael Van Canneyt
to Dominik Zablotny: The best would be like in Delphi. In Windows the native way of course. In posix we need…
Dominik Zablotny wrote 9 lines
> Not yet. > Any ideas how this should be done and/or what we need for it? The best would be like in Delphi. In Windows the native way of course. In posix we need TCanvas descendant that generate postscript file. There's something simmillar in libgnomeprint - http://developer.gnome.org/arch/imaging/printing.html, but it seems to be specific to gnome-canvas. The printing system choice is secondary issue. Anyway, it won't be easy.

Today I will commit a TCustomCanvas abstract implementation in the FCL. The idea (discussed with Matthias Gaertner) is to descend from this various canvases. One descdendent will be the LCL canvas. Another one (which will be committed as well) is a TImageCanvas, which draws on a bitmap in memory (which can subsequently be saved).

A TPostScriptCanvas would then be also one of the descendents. As a TWindowsCanvas etc.

Michael.

Unknown author

Title: Deleted menu bug

Entered by: samuel

Lazarus (0.9.0, RedHat 8) crashes with \"Acces violation\" if you open the menu editor for a menu, and delete the menu component, and you then click somewhere in the menu editor window. Everything else in the IDE works fine for me.

Unknown author

Title: Display option doesn\'t work

Entered by: Jesus Reyes A.

The option: Run->Run Parameters...->Local->Display doesn\'t work (lazarus v0.9.0 beta/linux/mandrake 9.0)

Mattias Gaertner
to Mattias Gaertner: On Thu, 31 Jul 2003 14:17:12 -0500 (CDT) This is the same. The display groupbox is just a…
Show quoted text 58 lines
--- Mattias Gaertner escribi�: > On Thu, 31 Jul 2003 14:17:12 -0500 (CDT) > Jesus Reyes wrote: > > > --- Mattias Gaertner escribi�: > On > Thu, > > 31 Jul 2003 13:32:12 -0400 > > > wrote: > > > > > > > > > > > Title: Display option doesn\'t work > > > > > > > > Entered by: Jesus Reyes A. > > > > > > > > The option: Run->Run Parameters...->Local->Display doesn\'t > work > > > (lazarus > > > > v0.9.0 beta/linux/mandrake 9.0) > > > > > > It works for me. > > > Can you give more details? > > > > > > > > > Mattias > > > > > > > if I do: > > > > $>export DISPLAY=quimica:0.0 > > $>./test1 > > > > I get the output of test1 in quimica, also using gdb, setting set > env > > DISPLAY=quimica:0 works for me. But it seems that, the > corresponding > > checkbox in the dialog box doesn't do anything here. I tried to > > override the DISPLAY value in run->run > parameters..->enviroment->user > > overrides also without effect. > > This is the same. The display groupbox is just a shortcut for > setting the > variable in the user overrides. The IDE sets the environment > variables and > starts gdb. Maybe your gdb resets the DISPLAY variable. Can you do > > $>export DISPLAY=quimica:0.0 > $>gdb ./test1 > (gdb) run > > ? > > Mattias > It worked fine, I see the output of test1 in quimica, both with gdb and gdb53 (which is what I use in the IDE). could it be that the IDE is reading this from cached values?.

Don't think so. But somewhere the DISPLAY variable is lost. Maybe you want to find out yourself:
The environment variables are given to the debugger in debugmanager.pas line 1338:
Project1.RunParameterOptions.AssignEnvironmentTo(FDebugger.Environment); You can add a writeln(FDebugger.Environment.Text); to see the variables. If you follow the AssignEnvironmentTo with "find declaration" you will see, that there is not much code in there. It fetches the current env vars and replaces the overrides.

The debugger creates a TProcess and assigns the variables to it in debugger/cmdlinedebugger.pp line 180.

Just add a few writelns to find out, where the DISPLAY variable is lost.

Mattias

Jesus Reyes
to Mattias Gaertner: On Thu, 31 Jul 2003 13:32:12 -0400 It works for me. Can you give more details? Mattias

--- Mattias Gaertner escribi�: > On Thu,
31 Jul 2003 13:32:12 -0400

Show quoted text 17 lines
wrote: > > Title: Display option doesn\'t work > > Entered by: Jesus Reyes A. > > The option: Run->Run Parameters...->Local->Display doesn\'t work (lazarus > v0.9.0 beta/linux/mandrake 9.0) It works for me. Can you give more details? Mattias

if I do:

$>export DISPLAY=quimica:0.0
$>./test1

I get the output of test1 in quimica, also using gdb, setting set env DISPLAY=quimica:0 works for me. But it seems that, the corresponding checkbox in the dialog box doesn't do anything here. I tried to override the DISPLAY value in run->run parameters..->enviroment->user overrides also without effect.

Jesus Reyes A.

_________________________________________________________ Do You Yahoo!?
La mejor conexi�n a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx

Mattias Gaertner
to Mattias Gaertner
Show quoted text 30 lines
--- Mattias Gaertner escribi�: > On Thu, 31 Jul 2003 13:32:12 -0400 > wrote: > > > > > Title: Display option doesn\'t work > > > > Entered by: Jesus Reyes A. > > > > The option: Run->Run Parameters...->Local->Display doesn\'t work > (lazarus > > v0.9.0 beta/linux/mandrake 9.0) > > It works for me. > Can you give more details? > > > Mattias > if I do: $>export DISPLAY=quimica:0.0 $>./test1 I get the output of test1 in quimica, also using gdb, setting set env DISPLAY=quimica:0 works for me. But it seems that, the corresponding checkbox in the dialog box doesn't do anything here. I tried to override the DISPLAY value in run->run parameters..->enviroment->user overrides also without effect.

This is the same. The display groupbox is just a shortcut for setting the variable in the user overrides. The IDE sets the environment variables and starts gdb. Maybe your gdb resets the DISPLAY variable. Can you do

$>export DISPLAY=quimica:0.0
$>gdb ./test1
(gdb) run

?

Mattias

Jesus Reyes
to Mattias Gaertner

--- Mattias Gaertner escribi�: > On Thu,
31 Jul 2003 14:17:12 -0500 (CDT)

Show quoted text 52 lines
Jesus Reyes wrote: > --- Mattias Gaertner escribi�: > On Thu, > 31 Jul 2003 13:32:12 -0400 > > wrote: > > > > > > > > Title: Display option doesn\'t work > > > > > > Entered by: Jesus Reyes A. > > > > > > The option: Run->Run Parameters...->Local->Display doesn\'t work > > (lazarus > > > v0.9.0 beta/linux/mandrake 9.0) > > > > It works for me. > > Can you give more details? > > > > > > Mattias > > > > if I do: > > $>export DISPLAY=quimica:0.0 > $>./test1 > > I get the output of test1 in quimica, also using gdb, setting set env > DISPLAY=quimica:0 works for me. But it seems that, the corresponding > checkbox in the dialog box doesn't do anything here. I tried to > override the DISPLAY value in run->run parameters..->enviroment->user > overrides also without effect. This is the same. The display groupbox is just a shortcut for setting the variable in the user overrides. The IDE sets the environment variables and starts gdb. Maybe your gdb resets the DISPLAY variable. Can you do $>export DISPLAY=quimica:0.0 $>gdb ./test1 (gdb) run ? Mattias

It worked fine, I see the output of test1 in quimica, both with gdb and gdb53 (which is what I use in the IDE). could it be that the IDE is reading this from cached values?.

Jesus Reyes A.

_________________________________________________________ Do You Yahoo!?
La mejor conexi�n a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx