Sign in Join

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

Mailing lists / lazarus / 2002-10

Okay, what else has changed in Lazarus?

10 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Andrew Johnson
Show quoted text 28 lines
Yesterday my help+about dialog worked just fine (too bad the tabs didn't ;-) Today, after updating Lazarus, the paint routines flicker something horrible and when you close the dialog it exceptions, and after that the application won't close correctly. I'm sure it's related to the scrolling label control and the Timer object that scrolls it, but there's nothing unusual. I already had checks to make it not paint when closing. The flicker seems to be that when I trigger the label to redraw with "invalidate" that it's triggering the entire form to redraw again (which triggers the label again... you get the picture) But that's just a guess. I've made no changes to that code either. Sources are still online if you need them at: http://members.telocity.com/~tonymaro/cbtracker-0.9.3-src.tar.gz I can always do away with the scrolling label control, but it adds a nice touch, you know? Thanks, Tony

I am not certain, but this may be sort of my fault. I changed TForm to inherited from TScrollingWinControl, like Delphi, and Modified its CreateComponent code in the interface to create a scrollbox with a layout. It may be that something between the two causes a problem. I will see if there is a workaround, or a flaw in my changes, or if this is something in the GTK end.

Wait... I do have a thought. It may be because the scrolling label inherits from TLabel. TLabel has no handle in GTK, which means a call to repaint it DOES call to repaint the parent. maybe the flickering is only now noticeable because of my changes. I will see what happens if I modify the Scrolling Label to use a TStaticText instead....Yes that worked..

I will leave the solution up to you, but I would suggest making use of my TStaticText code, and make TSrclLabel its own TGraphicControl which draws itself and so forth.. I am currently considering re-writing TLabel, but until that happens you will have an unsightly AboutBox, unless you fix it yourself.

Andrew

_________________________________________________________________ Get a speedy connection with MSN Broadband.� Join now! http://resourcecenter.msn.com/access/plans/freeactivation.asp

Reply by email

Tony Maro
to Andrew Johnson
Andrew Johnson wrote 12 lines
I am not certain, but this may be sort of my fault. I changed TForm to inherited from TScrollingWinControl, like Delphi, and Modified its CreateComponent code in the interface to create a scrollbox with a layout. It may be that something between the two causes a problem. I will see if there is a workaround, or a flaw in my changes, or if this is something in the GTK end. Wait... I do have a thought. It may be because the scrolling label inherits from TLabel. TLabel has no handle in GTK, which means a call to repaint it DOES call to repaint the parent. maybe the flickering is only now noticeable because of my changes. I will see what happens if I modify the Scrolling Label to use a TStaticText instead....Yes that worked..

Well this means that if I'm custom drawing my form background in the onpaint, yet have labels on the form, I'll always have problems, won't I? I don't mean just scrolling labels, but I noticed before that if I placed a label on the help-about I had to make sure I called .invalidate on the TLabel after every paint of the form or the painting of the form would hide the label. Perhaps it's a painting order issue with Lazarus as well?

I'm not familiar with a TStaticText so I'll go delve into the sources and see what you mean.

Thanks!
Tony

Reply by email

Tony Maro

Well, in addition to lack of drag-select in the Lazarus edit window I just learned that today's CVS has broken the tab page again.

My tab page will display all three tabs (Transfer tab should always be hidden since it's not implemented yet) AND it will display the deposit tab TWICE. But if you click on the duplicate tab the app crashes. I'm not creating pages at runtime, so this is happening internal to the lcl somewhere.

My complete application sources (in case you need them again) are available at:
http://members.telocity.com/~tonymaro/cbtracker-0.9.3-src.tar.gz

Now, I won't rule out that it's not triggered by something I did, but since I compiled these successfully only two things have changed.

#1) I updated Lazarus from CVS tonight
#2) I cleaned up the files and added comment code

So, I doubt it's anything I did since I haven't actually changed code in almost 24 hours. Just to be sure it wasn't corrupt Lazarus files on my part, I blew away my Lazarus directory and downloaded all the sources again. Didn't help.

Thanks,
Tony

Reply by email

Andrew Johnson

From: Tony Maro
Reply-To:
To: Lazarus List
Subject: Re: [lazarus] Okay, what else has changed in Lazarus? Date: 24 Oct 2002 12:23:32 -0500

Show quoted text 35 lines
On Thu, 2002-10-24 at 12:11, Andrew Johnson wrote: > I am not certain, but this may be sort of my fault. I changed TForm to > inherited from TScrollingWinControl, like Delphi, and Modified its > CreateComponent code in the interface to create a scrollbox with a layout. > It may be that something between the two causes a problem. I will see if > there is a workaround, or a flaw in my changes, or if this is something in > the GTK end. > > Wait... I do have a thought. It may be because the scrolling label inherits > from TLabel. TLabel has no handle in GTK, which means a call to repaint it > DOES call to repaint the parent. maybe the flickering is only now noticeable > because of my changes. I will see what happens if I modify the Scrolling > Label to use a TStaticText instead....Yes that worked.. Well this means that if I'm custom drawing my form background in the onpaint, yet have labels on the form, I'll always have problems, won't I? I don't mean just scrolling labels, but I noticed before that if I placed a label on the help-about I had to make sure I called .invalidate on the TLabel after every paint of the form or the painting of the form would hide the label. Perhaps it's a painting order issue with Lazarus as well? I'm not familiar with a TStaticText so I'll go delve into the sources and see what you mean. Thanks! Tony

A TStaticText is only marginally different then a TLabel in functionality. The Biggest difference is that it is a TCustomControl(TWinControl) instead of TGraphicControl(TControl). so it owns its own handle. As for your AV bizzarre problems, that may still be my fault. But it is also some funky coding. I will send you a modified about form which shouldn't have that AV.

Andrew

_________________________________________________________________ Surf the Web without missing calls!�Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp

Reply by email

Tony Maro
to Tony Maro: Well, in addition to lack of drag-select in the Lazarus edit window I just learned that…
Mattias Gaertner wrote 7 lines
Sometimes I wonder why some bugs are not discovered earlier. The notebook pages were added twice. I still don't know, why this did not happen before. I also discovered that the mainmenu handle was created twice on streaming. Pretty obvious bug. Why did no one report this?

HAHA! Well maybe that explains my problems with the menus and tabs that I've been complaining about for weeks ;-) Mostly it didn't happen to me unless I created a bunch of components in the ONCREATE event of the form though.

Thanks,
Tony

Reply by email

Tony Maro
to Andrew Johnson: From: Tony Maro Reply-To: To: Lazarus List Subject: Re: [lazarus] Okay, what else has…
Tony Maro wrote 14 lines
I found the AV problem - it seems that the ONCLOSE event is firing twice? Just a guess. I commented out all of the scrolling label code and it still crashed. It was freeing the TPixMap twice. When I changed the ONCLOSE to have: if FPixMap nil then begin FPixMap.Free; FPixMap := nil; end; it stopped crashing. -Tony

Thanks Andrew for the e-mail - you were right it's basically my fault. It's a showmodal form that I was closing and that was making ONCLOSE happen twice apparently.

Thanks for the tips.

-Tony

Reply by email

Mattias Gaertner
to Tony Maro: Well, in addition to lack of drag-select in the Lazarus edit window I just learned that…
Show quoted text 13 lines
On Thu, 2002-10-24 at 04:11, Mattias Gaertner wrote: > > Sometimes I wonder why some bugs are not discovered earlier. > The notebook pages were added twice. I still don't know, why this > did not happen before. > > I also discovered that the mainmenu handle was created twice on > streaming. Pretty obvious bug. Why did no one report this? HAHA! Well maybe that explains my problems with the menus and tabs that I've been complaining about for weeks ;-) Mostly it didn't happen to me unless I created a bunch of components in the ONCREATE event of the form though.

The double mainmenu had no impact on any other part of the LCL. The double pages were easily noticable, when you start a program in the terminal. Otherwise you just see strange crashes and double pages.

If you see any gtk warnings in the terminal plz report them.

Mattias

Reply by email

Tony Maro
to Tony Maro: Well, in addition to lack of drag-select in the Lazarus edit window I just learned that…

Yesterday my help+about dialog worked just fine (too bad the tabs didn't ;-)

Today, after updating Lazarus, the paint routines flicker something horrible and when you close the dialog it exceptions, and after that the application won't close correctly.

I'm sure it's related to the scrolling label control and the Timer object that scrolls it, but there's nothing unusual. I already had checks to make it not paint when closing.

The flicker seems to be that when I trigger the label to redraw with "invalidate" that it's triggering the entire form to redraw again (which triggers the label again... you get the picture) But that's just a guess.

I've made no changes to that code either. Sources are still online if you need them at:

http://members.telocity.com/~tonymaro/cbtracker-0.9.3-src.tar.gz

I can always do away with the scrolling label control, but it adds a nice touch, you know?

Thanks,

Tony

Reply by email

Mattias Gaertner
to Tony Maro: Well, in addition to lack of drag-select in the Lazarus edit window I just learned that…
Well, in addition to lack of drag-select in the Lazarus edit window I just learned that today's CVS has broken the tab page again.

Fixed.

Sometimes I wonder why some bugs are not discovered earlier. The notebook pages were added twice. I still don't know, why this did not happen before.

I also discovered that the mainmenu handle was created twice on streaming. Pretty obvious bug. Why did no one report this?

Mattias

Show quoted text 29 lines
My tab page will display all three tabs (Transfer tab should always be hidden since it's not implemented yet) AND it will display the deposit tab TWICE. But if you click on the duplicate tab the app crashes. I'm not creating pages at runtime, so this is happening internal to the lcl somewhere. My complete application sources (in case you need them again) are available at: http://members.telocity.com/~tonymaro/cbtracker-0.9.3-src.tar.gz Now, I won't rule out that it's not triggered by something I did, but since I compiled these successfully only two things have changed. #1) I updated Lazarus from CVS tonight #2) I cleaned up the files and added comment code So, I doubt it's anything I did since I haven't actually changed code in almost 24 hours. Just to be sure it wasn't corrupt Lazarus files on my part, I blew away my Lazarus directory and downloaded all the sources again. Didn't help. Thanks, Tony _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email

Tony Maro
to Andrew Johnson: From: Tony Maro Reply-To: To: Lazarus List Subject: Re: [lazarus] Okay, what else has…
Show quoted text 5 lines
A TStaticText is only marginally different then a TLabel in functionality. The Biggest difference is that it is a TCustomControl(TWinControl) instead of TGraphicControl(TControl). so it owns its own handle. As for your AV bizzarre problems, that may still be my fault. But it is also some funky coding. I will send you a modified about form which shouldn't have that AV.

I found the AV problem - it seems that the ONCLOSE event is firing twice? Just a guess.

I commented out all of the scrolling label code and it still crashed. It was freeing the TPixMap twice. When I changed the ONCLOSE to have:

     if FPixMap  nil then begin
        FPixMap.Free;
        FPixMap := nil;
     end;

it stopped crashing.

-Tony

Reply by email