> > So, a component that you place in the component palette implements > > some kind of "palette" interface, providing the IDE with the > > communications it needs to work with the component. > > Nice idea, but I think you'll end up creating a set of > interfaces which describes completely > TCollection/TCollectionItem TPersistent and TComponent, plus > you'll need to completely redesign streaming from the ground > up, and that's not possible for Delphi compatibility. You > would loose all existing Delphi components out there. > > Not to mention that you cannot insert a non-tcomponent in the > tComponent tree. And any 'component' from a package will be > regarded as a non-tcomponent by the code from classes, so: no > component on form, no streaming. > > Delphi's IDE uses interfaces everywhere, but still assumes > TComponent/TPersistent as the base classes. >
Could have some mechanism for TComponents that don't implement the IComponent to inject that functionality in them (maybe dynamically plug-in [best via the VMT, else partically via a special cast used only by the IDE] to the class an automatic IComponent interface implementation that implements IComponent by calling into Tcomponent. Such components would have to be rebuilt with the same version as the IDE, but others that implement IComponent (or IComponent2 etc.) themselves could be shipped as binary ones (say for commercial or free components that give no source [say have option to buy the source]), as long as they only use interfaces to access the IDE and don't use any RTL functionality that has objects. Such objects could also embed (and static link) to their own (tried) RTL version instead of linking to the IDE's latest RTL (the 2nd case needs RTL to be available as package I suppose - but even then could have both a static RTL and a dynamic package for it [also such components could ship their own RTL package maybe and it could be used only by them inside the same process if some versioning and namespace mechanism is used]) Speaking of namespaces, Borland added concept (to support .NET) in latest Delphis I think, has FPC done similar yet? Could help in this case ---------------- George Birbilis ([EMAIL PROTECTED]) Computer & Informatics Engineer Microsoft MVP J# for 2004-2007 Borland "Spirit of Delphi" 3D, QuickTime, QTVR, Java, Delphi, ActiveX, .NET components, Robotics http://www.kagi.com/birbilis http://birbilis.spaces.live.com _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel