Sign in Join

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

Mailing lists / lazarus / 1999-07

Resize crash

6 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Shane Miller

The crash was caused by the creation of the SendMessage3 procedure and the removal of the LM_CREATE message in SendMessage2. The canvas was being created in SendMessage2 yet.

In SendMEssage3, we cxurrently are sending it a TControl. I am going to change it to TObject because TControlCanvas is not derived from a TControl and therefore can't be sent as one.

Shane

>> "Baeseman, Cliff" 07/19 9:50 AM >>>

Cool.. We just commented out the code so that the canvas was not overpainting the menu items. It was causing some confusion.

I do not know how the menu bar is going to respond to the size changes because no default alignment method is set in the menubar constructor. If you look in TButton I set a default alignment in the TButton contructor to alNone. Stuff like the menu bar should be set to alTop as the default alignment method.

Cliff

Earlier message 24 lines
-----Original Message----- From: Shane Miller Sent: Monday, July 19, 1999 9:36 AM To: Subject: [lazarus] Resize crash Cliff, the reason the mainfor crashes when you resize it is because it throws a DRAW event and in Main.PP I was testing the TCanvas fillrect and I write to it. Of course, it's commented out so it crashes. I will fix it and re-submit the changes to CVS Shane _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Michael A. Hess
to Shane Miller
Shane Miller wrote
The crash was caused by the creation of the SendMessage3 procedure and the removal of the LM_CREATE message in SendMessage2. The canvas was being created in SendMessage2 yet.

Sorry about that. I was hoping it wouldn't hose anything. :-(

In SendMEssage3, we cxurrently are sending it a TControl. I am going to change it to TObject because TControlCanvas is not derived from a TControl and therefore can't be sent as one.

Works for me. We can just cast to TControl where needed. In fact should we make sure everything pass TObject and then just cast were needed. Might be a good idea.

==== Programming my first best destiny! ==== Michael A. Hess Miracle Concepts, Inc. http://www.miraclec.com

Reply by email

Baeseman, Cliff

Cool.. We just commented out the code so that the canvas was not overpainting the menu items. It was causing some confusion.

I do not know how the menu bar is going to respond to the size changes because no default alignment method is set in the menubar constructor. If you look in TButton I set a default alignment in the TButton contructor to alNone. Stuff like the menu bar should be set to alTop as the default alignment method.

Cliff

Earlier message 19 lines
-----Original Message----- From: Shane Miller Sent: Monday, July 19, 1999 9:36 AM To: Subject: [lazarus] Resize crash Cliff, the reason the mainfor crashes when you resize it is because it throws a DRAW event and in Main.PP I was testing the TCanvas fillrect and I write to it. Of course, it's commented out so it crashes. I will fix it and re-submit the changes to CVS Shane _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Shane Miller

OK, I believe it's all fixed again.

Here's the deal with the canvas.
I currently use a DrawingArea Widget to display the canvas. Notice the forms are currently black. That's because I needed to see the canvas. This will change in the next release.

I'm not sure about the Graphics Context thing yet. I am going to look into it further.

I'm going to try (emphasis on the word TRY) to create a generic editor for now so if I update CVS, you may not be able to open files, but you should see a new "cool" editor eventually.

BTW, I found something wrong in doing the TCanvas stuff. It seems that the "expose event" for GTK sends a height that is way off. I had to use the expose event in GTKINT.PP to re-draw the canvas but I had to change it from using the numbers received in the pgdkeventexpose structure, to using the forms size. The expose structure seems to give incorrect sizes when calling the event.

can anyone real familiar with GTK look into that?

Shane

Reply by email

Shane Miller

Cliff, the reason the mainfor crashes when you resize it is because it throws a DRAW event and in Main.PP I was testing the TCanvas fillrect and I write to it. Of course, it's commented out so it crashes.

I will fix it and re-submit the changes to CVS
Shane

Reply by email

Baeseman, Cliff

were you able to get the form gc with that call that I posted?

Cliff

Earlier message 59 lines
-----Original Message----- From: Shane Miller Sent: Monday, July 19, 1999 10:23 AM To: Subject: Re: RE: [lazarus] Resize crash The crash was caused by the creation of the SendMessage3 procedure and the removal of the LM_CREATE message in SendMessage2. The canvas was being created in SendMessage2 yet. In SendMEssage3, we cxurrently are sending it a TControl. I am going to change it to TObject because TControlCanvas is not derived from a TControl and therefore can't be sent as one. Shane >>> "Baeseman, Cliff" 07/19 9:50 AM >>> Cool.. We just commented out the code so that the canvas was not overpainting the menu items. It was causing some confusion. I do not know how the menu bar is going to respond to the size changes because no default alignment method is set in the menubar constructor. If you look in TButton I set a default alignment in the TButton contructor to alNone. Stuff like the menu bar should be set to alTop as the default alignment method. Cliff -----Original Message----- From: Shane Miller Sent: Monday, July 19, 1999 9:36 AM To: Subject: [lazarus] Resize crash Cliff, the reason the mainfor crashes when you resize it is because it throws a DRAW event and in Main.PP I was testing the TCanvas fillrect and I write to it. Of course, it's commented out so it crashes. I will fix it and re-submit the changes to CVS Shane _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email