Sign in Join

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

Mailing lists / lazarus / 1999-08

RFC : Type separation

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Michal Bukovjan

Hello,

I wanted to put into comments the idea that simple type used in controls.pp could be separated into a separate unit, say controltypes.pp.
The same could apply to stdccontrols.pp and on. Note that these would be units, not include files.
By simple types I mean type definitons that are not related to classes, mainly enumerated types and sets, and perhaps some constants, too.

This would allow to reference these types in units like lmessages.pp, gtkint.pp and gtkobject types, without referencing the whole classes, so that they can be used in messages without the need to typecast everything.

What do you think?

Michal Bukovjan

Reply by email

Michael A. Hess
to Michal Bukovjan
Michal Bukovjan wrote 9 lines
I wanted to put into comments the idea that simple type used in controls.pp could be separated into a separate unit, say controltypes.pp. This would allow to reference these types in units like lmessages.pp, gtkint.pp and gtkobject types, without referencing the whole classes, so that they can be used in messages without the need to typecast everything.

I'd have to look at it to see what could be moved out but off the top of my head I'm not sure what it would save. In the case of controls.pp just about every other unit needs the class information that is found in controls.pp. For example the gtkint uses the controls class to gather information about the object being passed to the interface unit. So this couldn't be removed. So I'm not sure if there is a case where controls is being used where just those simple types are being used. In most cases it is requiring access the TControl class. But hey I'll look at it. :-)

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

Reply by email