[fpc-devel] Opening FPC base classes
michael.vancanneyt at wisa.be
michael.vancanneyt at wisa.be
Mon Jul 23 13:58:56 CEST 2012
On Mon, 23 Jul 2012, Martin Schreiber wrote:
> Hi,
> I am the author of MSEide+MSEgui, a Free Pascal development environment:
> http://sourceforge.net/projects/mseide-msegui/
>
> MSEide+MSEgui is not Delphi compatible and handles some basic TComponent
> issues differently to Lazarus:
> http://www.lazarus.freepascal.org/
>
> Is it possible to add
> "
> protected //for toolkit access only
> property OwnerPrivate: TComponent read FOwner write FOwner; deprecated;
> property NamePrivate: TComponentName read FName write FName; deprecated;
> property ComponentsPrivate: TfpList read FComponents
> write FComponents; deprecated;
> property ComponentStatePrivate: TComponentState read FComponentState
> write FComponentState; deprecated;
> property FreeNotifiesPrivate: TFpList read FFreeNotifies
> write FFreeNotifies; deprecated;
> "
> to TComponent in order other toolkits than Lazarus can fulfil their
> taskwithout the necessity of changes in the FPC RTL?
These fields must remain private to ensure proper functioning of the
component system. Too much depends on the proper functioning of the
notification API and the owner/owned relations and its inherent memory
management.
We can discuss alternative solutions for the tasks you need to do, if
you'd care to explain them in detail.
>
> TReader and TWriter are classes which normally are used by frameworks only. Is
> it possible to move all private fields of TFiler, TReader and TWriter to
> protected in order other toolkits than Lazarus can fulfil their task without
> the necessity of changes in the FPC RTL?
No problems here, we can give protected access to all of these fields.
>
> Is it possible to add
> "
> protected //for toolkit access only
> property HandlePrivate: THandle read FHandle
> write FHandle; deprecated;
> " to THandleStream
No problems here. We can do this as well, provided we can make the
signature slightly different:
protected
Procedure SetHandle(AHandle : THandle); virtual;
property HandlePrivate: THandle read SetHandle
SetHandle will just set the FHandle fields, but I want a virtual setter
so descendent classes get a chance to react on the change in case they need to.
> and
> "
> protected //for toolkit access only
> property CapacityPrivate: PtrInt read FCapacity
> write FCapacity; deprecated;
> " to TMemoryStream?
TMemoryStream.Capacity is already read/write.
Why do you think you need direct access to the field ?
Michael.
More information about the fpc-devel
mailing list