[Lazarus] Is this bug ? or how to do?
FreeMan
freeman35 at delphiturkiye.com
Fri Feb 28 17:32:59 CET 2014
Thank you Martin, I was forget and checked it that.
I add this lines and now field list opening.
RegisterPropertyEditor(TypeInfo(string), TExLookUp, 'DataField',
TFieldProperty);//DataSource := Dataset1
RegisterPropertyEditor(TypeInfo(string), TExLookUp, 'ListField',
TFieldProperty);//ListSource := Dataset2
RegisterPropertyEditor(TypeInfo(string), TExLookUp, 'KeyField',
TFieldProperty);//ListSource := Dataset2
But: :) in components\ideintf\dbpropedits.pas
procedure TFieldProperty.FillValues(const Values: TStringList);
var DataSource: TDataSource;
begin
DataSource := GetObjectProp(GetComponent(0), 'DataSource') as
TDataSource;
LoadDataSourceFields(DataSource, Values);
end;
GetComponent(0) function is return my component "TExLookUp", this is okey.
But I have 2 Datasource Property:
published
property DataField: string read GetDataField write
SetDataField;//Accually people use same propertyname
property DataSource: TDataSource read GetDataSource write
SetDataSource;//Accually people use same propertyname
property KeyField: string read Get_KeyField write Set_KeyField;
property ListField: string read Get_ListField write Set_ListField;
property ListSource: TDataSource read Get_ListSource write
Set_ListSource;
TFieldProperty.FillValues function lookingfor in my root component, only
(string type)'DataSource' property.
For test:
property DataSourcex: TDataSource read GetDataSource write SetDataSource;
I change property name 'DataSource' to 'DataSourcex', when click to
DataField property, this error popup.
Unknown property: "DataSource".
Press OK to ignore and risk data corruption.
Press Cancel to kill the program.
Any idea ?
27-02-2014 21:44 tarihinde, Martin Frb yazdı:
>
> you are missing:
>
> RegisterPropertyEditor(TypeInfo(string), TComponent, 'DataField',
> TFieldProperty);
>
> see
> components\ideintf\dbpropedits.pas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20140228/5f8871ee/attachment-0003.html>
More information about the Lazarus
mailing list