Sign in Join

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

Mailing lists / lazarus / 2003-09

You can get onresize BEFORE onshow...

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Mattias Gaertner
to Tony: Blew my mind, but this explains a random bug that has bothered me for almost a year. In…
Show quoted text 18 lines
Blew my mind, but this explains a random bug that has bothered me for almost a year. In GTK with certain form positionings defined, a form resize event _can_ (not always) be triggered before the form's onshow, but after the oncreate. Since I was creating components in the onshow and then using them in onresize this kind of caused me problems. Initially I did this because of a bug in Lazarus which has long-since been fixed, but never moved the creation code. Specifically on _some_ systems this will happen every time if the form's position is set to "poscreencenter" and on other systems happens everytime if set to "podesktopcenter" but generally if it does it on one position type it does NOT do it on the other. Not really a bug, I guess, just a "that's odd".

Note: Many events come directly from the interface and the LCL does not reorder events (except some special cases). Applications should react to events.

But you are right, there should be no difference between "poscreencenter" and "podesktopcenter". Can you send me an example. I don't know, when I will have time to fix it. But it won't be lost.

Mattias

Reply by email

Tony
to Tony: Blew my mind, but this explains a random bug that has bothered me for almost a year. In…
Mattias Gaertner wrote 15 lines
On Sat, 27 Sep 2003 12:53:37 -0500 Tony wrote: >Specifically on _some_ systems this will happen every time if the form's >position is set to "poscreencenter" and on other systems happens >everytime if set to "podesktopcenter" but generally if it does it on one >position type it does NOT do it on the other. > But you are right, there should be no difference between "poscreencenter" and "podesktopcenter". Can you send me an example. I don't know, when I will have time to fix it. But it won't be lost.

That's just it though, I can't reliably reproduce it though I've seen the gdb output from two different users that proves it (not to mention all the others who screamed "I can't open CBT!")

But, I'll see what I can do (added to my list of things to investigate along with the combobox event and the IDE crashing which hasn't reoccured since Andrew's debug code was added BTW)

-Tony

Reply by email

Tony

Blew my mind, but this explains a random bug that has bothered me for almost a year.

In GTK with certain form positionings defined, a form resize event _can_ (not always) be triggered before the form's onshow, but after the oncreate.

Since I was creating components in the onshow and then using them in onresize this kind of caused me problems. Initially I did this because of a bug in Lazarus which has long-since been fixed, but never moved the creation code.

Specifically on _some_ systems this will happen every time if the form's position is set to "poscreencenter" and on other systems happens everytime if set to "podesktopcenter" but generally if it does it on one position type it does NOT do it on the other.

Not really a bug, I guess, just a "that's odd".

Tony Maro Systems Consultant The Maro Group (256) 337-5759 http://www.maro.net/

Reply by email