Sign in Join

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

Mailing lists / lazarus / 1999-09

CVS Changes

22 messages · 9 people ·

Reply by email Subscribe to this list Your subscription

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

Samuel Liddicott
to Shane Miller: OK, I updated CVS with my latest AGAIN. Now you can open a file. Can someone look into a…
Show quoted text 11 lines
-----Original Message----- From: Shane Miller Sent: Wednesday, September 15, 1999 04:34 AM To: Subject: [lazarus] CVS Changes I need to be able to do this in order to display the cursor correctly. I can't simply draw it and erase it like I'm doing now, I need to xor it with itself to erase it.

Patent alert! This method of drawing cursors is petended. Daft, but it is. Daft, because there are lots of other ways of doing it (like copy bitmap before cursor is put on, and replace).

I don't care which way its done, but thought I'd point it out.

Sam

Reply by email

Shane Miller
to Shane Miller: I needed to make a few changes to CVS. I changed the OPenFileDialog to be called…

OK, I updated CVS with my latest AGAIN.
Now you can open a file.

Can someone look into a way to do an XOR on a pixel color on the form.

I need to be able to do this in order to display the cursor correctly. I can't simply draw it and erase it like I'm doing now, I need to xor it with itself to erase it.

and Canvas.SetPixel. This was the way I was going to GET the pixel color, but it crashes. I was using it in editor.pp's DrawCursor and EraseCursor but I commented them out.

Pelase, someone
Shane

Reply by email

Shane Miller

I see trackbar was updated to remove the scaledigits. I was updating at the same time so this may have cuased a problem, but I had to comment a line out in gtkobject.inc that contained the variable scaledigits. It was undefined.

As for the editor, you can not type stuff and it appears, you can click and the cursor shows up pretty close to where it should, and you can backspace over characters.

I added invalidaterect to gtkobject.inc and it works pretty cool, but not perfectly. I need to only redraw the TRECT portion of the screen, but I end up re-drawing everything because of a redraw in the FORMPAINT after I do a colorize. When I took the Canvas.AutoReDraw := true (which forces a redraw) it didn't appear correctly.

Not sure how to get around that yet, so I commented most of the code in the invalidaterect out. Would like to get it to work though.

Soon, you will be able to save files in the editor.....should be easy.....should....

------------------------------------------------------------ Shane Miller

Get paid to surf the net!
http://alladvantage.com/go.asp?refid=DEX-870

Home page : http://www.lakefield.net/~smiller

Auto-IP Publisher : http://www.lakefield.net/~smiller/autoip

Advanced Clipboard : http://www.lakefield.net/~smiller/advclipboard

Lazarus : http://www.miraclec.com/lazarus
----------------------------------------------------------

Reply by email

Curtis White
to Shane Miller: OK, I updated CVS with my latest AGAIN. Now you can open a file. Can someone look into a…
On 15-Sep-99 Shane Miller wrote 5 lines
OK, I updated CVS with my latest AGAIN. Now you can open a file. Can someone look into a way to do an XOR on a pixel color on the form.

This exact thing was just discussed on the GTK mailing list (working with single pixels and pixel colors) over the last couple days. I deleted all the messages because I didn't need them. I will look back through the archives over the last 2 or 3 days and see if I can find that thread for you.

Curtis

Reply by email

Shane Miller
Patent alert! This method of drawing cursors is petended. Daft, but it

is.

Show quoted text 5 lines
Daft, because there are lots of other ways of doing it (like copy bitmap before cursor is put on, and replace). I don't care which way its done, but thought I'd point it out.

I heard that too. I guess IBM owns the patent, but may not defend it yet. Not sure what to do now.

XOR'ing it is best because it won't overwrite the text that's there then.

------------------------------------------------------------ Shane Miller

Get paid to surf the net!
http://alladvantage.com/go.asp?refid=DEX-870

Home page : http://www.lakefield.net/~smiller

Auto-IP Publisher : http://www.lakefield.net/~smiller/autoip

Advanced Clipboard : http://www.lakefield.net/~smiller/advclipboard

Lazarus : http://www.miraclec.com/lazarus
----------------------------------------------------------

Earlier message 35 lines
-----Original Message----- From: Samuel Liddicott To: Date: Friday, September 17, 1999 4:50 AM Subject: RE: [lazarus] CVS Changes > > >> -----Original Message----- >> From: Shane Miller >> Sent: Wednesday, September 15, 1999 04:34 AM >> To: >> Subject: [lazarus] CVS Changes >> >> I need to be able to do this in order to display the cursor >> correctly. I can't >> simply draw it and erase it like I'm doing now, I need to xor it >> with itself to >> erase it. > >Patent alert! This method of drawing cursors is petended. Daft, but it is. >Daft, because there are lots of other ways of doing it (like copy bitmap >before cursor is put on, and replace). > >I don't care which way its done, but thought I'd point it out. > >Sam > >_________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus >

Reply by email

Shane Miller

I needed to make a few changes to CVS.

I changed the OPenFileDialog to be called OPenDialog and the SaveFileDialog to be called SAveDialog.

I changed the example and will commit that soon too.

I also changed the editor.pp and added a "fake" InvalidateRect to TWinControl. All it currently does is calls Invalidate.

I finally got to my work and pulled my latest editor.pp. I committed it now, but it doesn't display any text when you open a file. Pressing the keys now works, but of course, nothing changes.

I will look into this of course.

Shane

Reply by email

Marc Weustink
to Shane Miller: What about TScrollBar. That's not finished is it? I know Cliff was going to do it but…

Hi,
while debugging I needed TControl.Controls[], so I added it. Then I found that our TContol has a FWInControls and a FControls collection. Whats the meaning of this. (FWInControls is only referenced on Insert and Delete). Furter I saw that Self is a member of FControls. Is this correct. I thought that FControls only contained Child controls.

Marc

Reply by email

Marc Weustink
to Shane Miller: What about TScrollBar. That's not finished is it? I know Cliff was going to do it but…
shane wrote 6 lines
/me wrote >OK, Some othe controls to do ? > What about TScrollBar. That's not finished is it? I know Cliff was going to do it but got stuck on other things....I don't think it ever got finished.

If it in't finished 'll try second

Otherwise, look at the TNotebook. I seem to be having trouble with it. I added some code in Main.pp to display the tabbed notebook but it's not showing up.......It may be because I was trying to add the canvas to it and possible messed it up....

I'll look at this first.

Marc

Reply by email

Gertjan Schouten
to Marc Weustink: Ah, thats what thought as well. Only the code now just split's them up. If FControls…
Show quoted text 7 lines
* A control should never be part of its own controls collection. In my debugmessages I see constructions like: [TWinControl.Remove] TBUTTON --> Remove: TBUTTON () [TWinControl.Insert] TPAGE --> Insert: TBUTTON () and it looks like the parent of TBUTTON was TBUTTON itself. Something similar: A form has no parent and while looping through the controls collection, you'll find the form as Controls[0]

Parent in TForm has only meaning if the form is an MDIChild. Setting the FormStyle of a Form to fsMDICHILD sets the Parent property to Application.MainForm, otherwise Parent is always NIL

Gertjan

Reply by email

Michael Van Canneyt
to Gertjan Schouten
Gertjan Schouten wrote 11 lines
> * A control should never be part of its own controls collection. In my > debugmessages I see constructions like: > [TWinControl.Remove] TBUTTON --> Remove: TBUTTON () > [TWinControl.Insert] TPAGE --> Insert: TBUTTON () > and it looks like the parent of TBUTTON was TBUTTON itself. > Something similar: A form has no parent and while looping through the > controls collection, you'll find the form as Controls[0] Parent in TForm has only meaning if the form is an MDIChild. Setting the FormStyle of a Form to fsMDICHILD sets the Parent property to Application.MainForm, otherwise Parent is always NIL

Actually, there is a trick that allows you to set parent to an arbitrary form. it's documented in Charlie Calvert's book on Delphi.

Michael.

Reply by email

Peter Vreman
to Stefan Hille: Hi! I did a little debugging on this tonight and found out the following thinks: 1. I…
Show quoted text 22 lines
On Mon, Sep 27, 1999 at 12:04:14AM -0700, Curtis White wrote: > I am also still trying to figure out what happened to the Notebook component > and the example. Both were working and now neither one works. It is probably > something very simple that I am just overlooking. But it sure is giving me > trouble finding it. > > I think I will try checking out the LCL from about 2 versions back when I > know it was working. Then I can compare customnotebook.inc and also > gtkobject.inc from both versions and see if I can figure out what is different. > But if someone else finds the problem first, that will also be wonderful. Then I > can get back to the clipboard component :-) I did a little debugging on this tonight and found out the following thinks: 1. I tried to figure out the relevant changes between current gtkobject.inc (v1.55) and v1.46 but these did'nt do the trick. 2. Although not absolutely sure I still think that somewhere between v1.46 and 1.52 of gtkobject.inc some changes in that file were lost. If you made changes between those versions you should check them all out again.

use 'cvs rdiff'. See 'cvs rdiff --help' for help.

Peter

Reply by email

Marc Weustink
to Shane Miller: What about TScrollBar. That's not finished is it? I know Cliff was going to do it but…
"Gertjan Schouten" wrote 7 lines
> Hi, > while debugging I needed TControl.Controls[], so I added it. > Then I found that our TContol has a FWInControls and a FControls > collection. Whats the meaning of this. (FWInControls is only referenced on FControls contains all child objects which have been derived from TControl, including all TWinControl objects.

Ah, thats what thought as well. Only the code now just split's them up. If FControls should contain all of then I'll remove the 'else'

FWinControls contains only child objects derived from TWinControl.

OK

This also determines the z-order of the controls, non windowed controls never appear before windowed controls. f.e. a TBevel can never overlap a TEdit control.

Thats clear.

> Insert and Delete). Furter I saw that Self is a member of FControls. Is > this correct. I thought that FControls only contained Child controls. It should contain only child controls.

Hmmm... I think for forms, the form is added as well. I can remember some discussion on this.
Somebody ?

Marc

Reply by email

Stefan Hille
to Shane Miller: What about TScrollBar. That's not finished is it? I know Cliff was going to do it but…

Hi!

Curtis White wrote 10 lines
I am also still trying to figure out what happened to the Notebook component and the example. Both were working and now neither one works. It is probably something very simple that I am just overlooking. But it sure is giving me trouble finding it. I think I will try checking out the LCL from about 2 versions back when I know it was working. Then I can compare customnotebook.inc and also gtkobject.inc from both versions and see if I can figure out what is different. But if someone else finds the problem first, that will also be wonderful. Then I can get back to the clipboard component :-)

I did a little debugging on this tonight and found out the following thinks:

1. I tried to figure out the relevant changes between current gtkobject.inc (v1.55) and v1.46 but these did'nt do the trick.

2. Although not absolutely sure I still think that somewhere between v1.46 and 1.52 of gtkobject.inc some changes in that file were lost. If you made changes between those versions you should check them all out again.

3. The crash happens when the following code is processed the second time (index = 1).

<<

      procedure TNBPages.Put(Index: Integer; const S: String);
      var
      //Msg: TLMTabSetText;
        Msg: TLMNotebookEvent;
      begin

+-> TPage(fPageList[Index]).Caption := S;
| >>
|
|
| TO be more precise: The crash really happens in TControl.SetText when |
| fCaption := Value;
|
| is executed. Since Value is correct at that time, |
+---- fPageList[Index] seems to return be invalid pointer

hope this helps,

Stefan

--------------------------------------------------------- Stefan Hille email: 48155 Muenster voice: 0251/664695

Reply by email

Cliff Baeseman

I use this trick when building active x controls with delphi also. You cannot pop up a form unless it is modal so I just do some reparenting of forms at run time.

Cliff

Earlier message 34 lines
-----Original Message----- From: Michael Van Canneyt To: Date: Thursday, September 30, 1999 4:26 AM Subject: Re: [lazarus] TNoteBook probems Fixed > > >On Thu, 30 Sep 1999, Gertjan Schouten wrote: > >> > * A control should never be part of its own controls collection. In my >> > debugmessages I see constructions like: >> > [TWinControl.Remove] TBUTTON --> Remove: TBUTTON () >> > [TWinControl.Insert] TPAGE --> Insert: TBUTTON () >> > and it looks like the parent of TBUTTON was TBUTTON itself. >> > Something similar: A form has no parent and while looping through the >> > controls collection, you'll find the form as Controls[0] >> >> Parent in TForm has only meaning if the form is an MDIChild. >> Setting the FormStyle of a Form to fsMDICHILD sets the Parent >> property to Application.MainForm, otherwise Parent is always NIL > >Actually, there is a trick that allows you to set parent to an arbitrary form. >it's documented in Charlie Calvert's book on Delphi. > >Michael. > >_________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus >

Reply by email

Marc Weustink
to Marc Weustink: Ah, thats what thought as well. Only the code now just split's them up. If FControls…

And got lots of others :-)

I can't reach CVS tonight so I might be able to update it tomorrow. (And if not tomorrow... I'll be on a holliday for 3 weeks)

Basic problem was that a notebook page already had a notebook as parent. gtk does not like that.

Modifications: A few
- Removed some debug messages
+ Added some others
* changed fixed widged of TPage. Code is still broken.
+ TWinControls are also added to the Controls collection
+ Added TControl.Controls[] property

Problems:
* The way Owner and Parent are used is not correct. lcl components have owners. GTK objects have (lcl) parents.

A construction (in say MyForm.Create) like:

  TButton.Create(Self).Parent := NoteBook1.Page[0];

should create a button on page0. This is however not the case (its created on MyForm)

* The CreateComponent and AddControl methods shouldn't be used in the way it is used now. Like ik was in TPage, you get very unpredictable results. IMHO AddControl should be called after assigning/changing parent. and Create component the first moment we need a visible/touchable part.

* A control should never be part of its own controls collection. In my debugmessages I see constructions like:
[TWinControl.Remove] TBUTTON --> Remove: TBUTTON () [TWinControl.Insert] TPAGE --> Insert: TBUTTON ()
and it looks like the parent of TBUTTON was TBUTTON itself. Something similar: A form has no parent and while looping through the controls collection, you'll find the form as Controls[0]

Marc

Reply by email

Gertjan Schouten
to Shane Miller: What about TScrollBar. That's not finished is it? I know Cliff was going to do it but…
Hi, while debugging I needed TControl.Controls[], so I added it. Then I found that our TContol has a FWInControls and a FControls collection. Whats the meaning of this. (FWInControls is only referenced on

FControls contains all child objects which have been derived from TControl, including all TWinControl objects. FWinControls contains only child objects derived from TWinControl.

This also determines the z-order of the controls, non windowed controls never
appear before windowed controls. f.e. a TBevel can never overlap a TEdit control.

Insert and Delete). Furter I saw that Self is a member of FControls. Is this correct. I thought that FControls only contained Child controls.

It should contain only child controls.

Gertjan.

Reply by email

Shane Miller
Show quoted text 9 lines
I added my last changes of TCustomImageList to CVS. Most implementations except stream/resource handling and all methods concerning TIcon, should be finished. For these I'll wait till TBitmap or TIcon is implemented. Marc OK, Some othe controls to do ?

What about TScrollBar. That's not finished is it? I know Cliff was going to do it but got stuck on other things....I don't think it ever got finished.

Otherwise, look at the TNotebook. I seem to be having trouble with it. I added some code in Main.pp to display the tabbed notebook but it's not showing up.......It may be because I was trying to add the canvas to it and possible messed it up....

------------------------------------------------------------ Shane Miller

Get paid to surf the net!
http://alladvantage.com/go.asp?refid=DEX-870

Home page : http://www.lakefield.net/~smiller

Auto-IP Publisher : http://www.lakefield.net/~smiller/autoip

Advanced Clipboard : http://www.lakefield.net/~smiller/advclipboard

Lazarus : http://www.miraclec.com/lazarus
----------------------------------------------------------

Earlier message 23 lines
-----Original Message----- From: Marc Weustink To: Date: Sunday, September 26, 1999 10:14 AM Subject: [lazarus] CVS Changes TCustomImageList >I added my last changes of TCustomImageList to CVS. >Most implementations except stream/resource handling and all methods >concerning TIcon, should be finished. For these I'll wait till TBitmap or >TIcon is implemented. > >Marc > >OK, Some othe controls to do ? > > > >_________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus >

Reply by email

Curtis White
to Shane Miller

I am also still trying to figure out what happened to the Notebook component and the example. Both were working and now neither one works. It is probably something very simple that I am just overlooking. But it sure is giving me trouble finding it.

I think I will try checking out the LCL from about 2 versions back when I know it was working. Then I can compare customnotebook.inc and also gtkobject.inc from both versions and see if I can figure out what is different. But if someone else finds the problem first, that will also be wonderful. Then I can get back to the clipboard component :-)

Curtis

On 26-Sep-99 Shane Miller wrote 60 lines
>I added my last changes of TCustomImageList to CVS. >Most implementations except stream/resource handling and all methods >concerning TIcon, should be finished. For these I'll wait till TBitmap or >TIcon is implemented. > >Marc > >OK, Some othe controls to do ? > What about TScrollBar. That's not finished is it? I know Cliff was going to do it but got stuck on other things....I don't think it ever got finished. Otherwise, look at the TNotebook. I seem to be having trouble with it. I added some code in Main.pp to display the tabbed notebook but it's not showing up.......It may be because I was trying to add the canvas to it and possible messed it up.... ------------------------------------------------------------ Shane Miller Get paid to surf the net! http://alladvantage.com/go.asp?refid=DEX-870 Home page : http://www.lakefield.net/~smiller Auto-IP Publisher : http://www.lakefield.net/~smiller/autoip Advanced Clipboard : http://www.lakefield.net/~smiller/advclipboard Lazarus : http://www.miraclec.com/lazarus ---------------------------------------------------------- -----Original Message----- From: Marc Weustink To: Date: Sunday, September 26, 1999 10:14 AM Subject: [lazarus] CVS Changes TCustomImageList >I added my last changes of TCustomImageList to CVS. >Most implementations except stream/resource handling and all methods >concerning TIcon, should be finished. For these I'll wait till TBitmap or >TIcon is implemented. > >Marc > >OK, Some othe controls to do ? > > > >_________________________________________________________________ > 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

----------------------------------
Curtis White
Curtis White
http://www.teleport.com/~osiriz/
----------------------------------

Reply by email