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?

Mailing lists / lazarus / 2010-09
5 messages · 2 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
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
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 :
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
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 :