[Lazarus] Problem streaming properties without unit interfaces
Mattias Gaertner
nc-gaertnma at netcologne.de
Tue Jun 30 18:21:04 CEST 2009
On Tue, 30 Jun 2009 13:03:01 +0200
Joost van der Sluis <joost at cnoc.nl> wrote:
> Hi all,
>
> It seems like it that streaming properties referencing to objects on
> other datamodules does not work without the unit interfaces.
>
> For example, you have two datamodules, on one you define a
> TIBConnection, and on the other a TSQLQuery. Now set the Database
> property of the TSQLQuery to the TIBConnection on the other
> datamodule.
>
> At runtime the Database property will be nil, if the unit interfaces
> is not linked in. When you use the interfaces unut somewhere, it
> works.
>
> Why? How? Any ideas where this comes from?
Components are found by the FindGlobalComponent function of unit
classes.
TApplication registers one event in its constructor:
RegisterFindGlobalComponentProc(@FindApplicationComponent);
It searches in Application and Screen.
You can register your own handler to find more.
AFAIK: Delphi has the same mechanism.
Mattias
More information about the Lazarus
mailing list