Sign in Join

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

Mailing lists / lazarus / 2010-09

What's this mean?

5 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Unknown author

I'm creating a component that show modal a form at design time. when ShowModal function is called, on console I got:

[WARNING] ShowModal called without handle for formname (TFormName)

Somebody have some idea?

Reply by email

Mattias Gaertner
to Unknown author
Show quoted text 7 lines
I'm creating a component that show modal a form at design time. when ShowModal function is called, on console I got: [WARNING] ShowModal called without handle for formname (TFormName) Somebody have some idea?

There is something wrong before your ShowModal call. More code is needed to tell more.

Mattias

Reply by email

Unknown author
to Mattias Gaertner

Hi!

Yesterday, after some days without some result with my form, I wrote to Lazarus List as a last chance to the form, because I don't have any idea about this problem and I was desperate. It work's on Lazarus 0.9.28 (and with some versions of 0.9.29, but not with latest revisions) and Delphi. I thought that the problem is with lfm or lrs file. So I compared lrs and lfm files with others form files and nothing wrong. So I compared the code. At some point was wrote:

procedure AfterConstruction; override;

On others forms that are working, I don't have this procedure. So, I go to svn, to see how, why and when this procedure Is wrote. So reading the code I see that is missing on implementation of procedure AfterConstruction this line:

inherited AfterConstruction;

So, this problem exists when this procedure is wrote, but some change made in recent Lazarus 0.9.29 revisions broke my "broken" code.

I discover it some hours ago :)

Regards,

Fabio

2010/9/11 Mattias Gaertner :

Show quoted text 22 lines
On Fri, 10 Sep 2010 14:43:38 -0300 "" wrote: > I'm creating a component that show modal a form at design time. when > ShowModal function is called, on console I got: > > [WARNING] ShowModal called without handle for formname (TFormName) > > > Somebody have some idea? There is something wrong before your ShowModal call. More code is needed to tell more. Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Mattias Gaertner
to Unknown author
Show quoted text 21 lines
Hi! Yesterday, after some days without some result with my form, I wrote to Lazarus List as a last chance to the form, because I don't have any idea about this problem and I was desperate. It work's on Lazarus 0.9.28 (and with some versions of 0.9.29, but not with latest revisions) and Delphi. I thought that the problem is with lfm or lrs file. So I compared lrs and lfm files with others form files and nothing wrong. So I compared the code. At some point was wrote: procedure AfterConstruction; override; On others forms that are working, I don't have this procedure. So, I go to svn, to see how, why and when this procedure Is wrote. So reading the code I see that is missing on implementation of procedure AfterConstruction this line: inherited AfterConstruction; So, this problem exists when this procedure is wrote, but some change made in recent Lazarus 0.9.29 revisions broke my "broken" code.

In every release some virtual methods become more important, some less. Do you think a note should be added to the 0.9.29 release notes for AfterConstruction?

I discover it some hours ago :)

:)

Mattias

Reply by email

Unknown author
to Mattias Gaertner

I think that isn't needed add this note to release notes. Add inherited <yourmethodname>; when you is overriding a method is a good practice of Object oriented programming (to me) in environments that have a lot of changes in a little time (like development releases of Lazarus like 0.9.29). I forgot the inherited when overloading some Loaded procedures some time ago and on some versions it works and on others not. So when I adopted this practice I don't have more this kind of problem. This case is isolated because this is my second TComponentEditor that I do, and the first time that I override the AfterConstruction procedure.

Regards,

Fabio

2010/9/11 Mattias Gaertner :

Show quoted text 42 lines
On Sat, 11 Sep 2010 08:58:08 -0300 "" wrote: > Hi! > > Yesterday, after some days without some result with my form, I wrote > to Lazarus List as a last chance to the form, because I don't have any > idea about this problem and I was desperate. It work's on Lazarus > 0.9.28 (and with some versions of 0.9.29, but not with latest > revisions) and Delphi. I thought that the problem is with lfm or lrs > file. So I compared lrs and lfm files with others form files and > nothing wrong. So I compared the code. At some point was wrote: > > procedure AfterConstruction; override; > > On others forms that are working, I don't have this procedure. So, I > go to svn, to see how, why and when this procedure Is wrote. So > reading the code I see that is missing on implementation of procedure > AfterConstruction this line: > > inherited AfterConstruction; > > So, this problem exists when this procedure is wrote, but some change > made in recent Lazarus 0.9.29 revisions broke my "broken" code. In every release some virtual methods become more important, some less. Do you think a note should be added to the 0.9.29 release notes for AfterConstruction? > I discover it some hours ago :) :) Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email