Groups > Borland > Delphi Object Oriented design > Re: OOP Design in Delphi using VCL




Re: OOP Design in Delphi using VCL

Re: OOP Design in Delphi using VCL
Thu, 7 Feb 2008 15:13:26 +0200
Marc

I created a number of frames, but I find that some event handlers in the 
frames do not get called. I have to add events to the frames via the main 
form. I want the event handlers in the frame units to be called, since I 
have now put the event handlers that were in the main form in their own 
frames.

Pier

"Marc Rohloff [TeamB]" <marc@nospam.marcrohloff.com> wrote in
message 
news:ij7ivno53zd3.dlg@dlg.marcrohloff.com...
> On Mon, 21 Jan 2008 12:35:35 +0200, Pier wrote:
>
>> I am writing an internet application in Delphi 7 and have ended up with
a
>> lot of code in the main form's unit file. I make use of many of the 
>> events
>> of controls on the main form. I want to make the application more
modular 
>> so
>> I thought of deriving classes in separate units for some of the
controls 
>> on
>> the main form and overriding methods instead of using events. Is this a

>> good
>> approach or is there a better way of making the application more
modular?
>
> I would only override a control if I wanted to change its
> functionality and reuse it. I would break the form up into individual
> frames, each handling a group of controls. You can add events and
> methods to the frame which your main form can call.
>
> -- 
> Marc Rohloff [TeamB]
> marc -at- marc rohloff -dot- com 

Post Reply
about | contact