[RE: [lazarus] CVS updated]]

Michal Bukovjan mbukovjan at netscape.net
Fri Aug 20 12:35:00 EDT 1999



> "csComboBox" that is currently held in fCompStyle.
> 
> This value will be filled by the control when when CreateParams is called.
> 
> I have:
> 
> Procedure TWinControl.CreateWnd;
> var
>   Params : TCreateParams;
> begin
>   CreateParams(Params);
>   // Params.WinClassName now contains GTK compstyle
>   { Somehow use the GTK unit to create object but I haven't looked that up
> yet }
> end;

The point here is that the TWinControl does not have anything to do with GTK.
It should be widget-set abstract. It just calls SendMessage with the message
LM_CREATE (I think it is in CreateComponent method now), and the SendMessage
is mapped to whatever interface unit you need. If you are creating your
project for GTK widgets, it calls the (Int)SendMessage(3) from GtkInt.pp, if
you are creating for Win32, the Win32Int.pp, and so on.

So since handles and stuff like this is one widget set specific (Win32
widgets), it should be not present in TWinControl (in spite of its ridiculous
classname). The CreateWnd stuff should be inside LM_CREATE message handler in
Win32Int.pp, if possible.

Also note that fCompStyle is a helper property only, and may be obsolete by
now. It does not have anything to do with GTK.


> 
> So I think we should remove fCompStyle from the control declaration.
> 
> Could some CVS wizard let me know the chances of successfully combining my
> changes given that the CVS is now running away without me and I can't do
any
> more checkouts for fear of loosing mu own changes.  Or can I somehow
combine
> the current CVS and keep my own changes ready for checking in?

To keep your existing changes with CVS, create patches. Under Linux, it is
simple.

1. Copy your existing lazarus stuff with changes (lazarus directory) into a
new directory, say /usr/src/lazarus-new

2. Copy current CVS state into another directory, say /usr/src/lazarus-old

3. From both directories, remove binary files, *.ppu and *.o. You may also
want to remove /CVS subdirs

4. From the /usr/src directory, write :
diff -ruN lazarus-old lazarus-new > mypatchfile.diff

5. Optionally, you may gzip the patch by issuing
gzip mypatchfile.diff

6. Please note that the original CVS state (lazarus-old dir) should be created
when you begin to make your changes. If it is not, be VERY careful, because
the patch would recognize and add your changes, but would delete any changes
commited to CVS by others during the time you coded. Always review your diff
file (it is a plain text file) to see what it is doing.

7. Send the patch for someone to review, I think someone from the core team
(Shane? Cliff?). If he likes it, he will apply that into the CVS.

8. The patch may be applied by issuing from the CVS root dir :
patch -p1 -i mypatchfile.diff

{ You will apply that patch after you checkout the CVS for latest changes, and
viola, your changes are within too :-)

9. The patch may be reverted (i.e. puts the CVS tree back to its original
state) by issuing
patch -R -p1 -i mypatchfile.diff

{This is for core member team, if he does not like your changes :-)

If you are in Windows, God bless you :-)
No, seriously, I think that the GNU utils are for Windows somewhere, too.

Michal Bukovjan






More information about the Lazarus mailing list