[lazarus] object creation

Sergio A. Kessler sak at perio.unlp.edu.ar
Thu May 20 17:12:55 EDT 1999


"Shane Miller" <SMiller1 at stvgb.org> el día Thu, 20 May 1999 15:45:59 -0500, 
escribió:

>I believe each component should do it's own object creation.  I know that 
it was put in that one spot for ease of use initially.  
>
>We have to seperate it from the classes eventually anyway if we are going 
to make this work with QT and the like.  I would say that there should be an 
external file that we call  to do all the creates. 

it's not only the create of the widget, it also all the signaling,
see dialogs.pp

 Each class (tform, tbutton, tsomething) would call a procedure to create 
it's gtk/qt/lmnop widget and assign the appropriate events.  That way the 
source is seperate and we could act like we are doing a WINAPI call if we 
want.  
>
>Shouldn't be that difficult, and if someone wants to move them, that's fine 
by me.  

ok, I will do some hacks tonigth in controls.pp and in forms.pp
(and a little dialogs.pp)

>I don't see any problem for people constructing their own components 
because they will simply fake a winapi (or whatever) call that will 
construct the widget.  If they are going real "low" level and creating a new 
gtk_widget, it simply gets added to the lazarus_gtk file (where the widgets 
are created)

don't count on this, it's not that simple (I will try, but don't hold
your breath)

 and they create a class called TCustomNewWidget where "NewWidget" is the 
name of their new widget.
>
>I haven't really spent much time on this.  I think instead of throwing out 
this info, perhaps we could get our strategy documented in HTML and 
displayed on the Lazarus site?  Any volunteers?  A nice Component/Class 
structure tree would be cool.  That way we all see what the plan is and can 
talk about something concrete.
>
>(get me talking and you can't shut me up)

please, please, use the enter key  :(




>>>> "Sergio A. Kessler" <sak at perio.unlp.edu.ar> 05/20 3:30 PM >>>
>
>Shane, what do you think about where to do object creation ?
>
>I made it clear, IMO, that should be done in the components
>themselves and not in a inner class (too many problems).
>
>Also, note that there are some problems with TWinControls,
>if the user choose the close button of the wm, the widget
>is destroyed, yes, destroyed. So we need to simulate the
>Delphi behavior like in dialogs.pp, wich is recreated if
>it is destroyed.
>
>Sergio
>
>_________________________________________________________________
>     To unsubscribe: mail lazarus-request at miraclec.com with
>                "unsubscribe" as the Subject
>    archives at http://www.miraclec.com/list_archives/lazarus
>
>_________________________________________________________________
>     To unsubscribe: mail lazarus-request at miraclec.com with
>                "unsubscribe" as the Subject
>    archives at http://www.miraclec.com/list_archives/lazarus






More information about the Lazarus mailing list