On Tue, 30 Jun 2009 13:03:01 +0200 Joost van der Sluis <[email protected]> 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 -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
