Neven wrote:
> I've been writing a component editor the the SQL on a query and I use the
> following code
>
>   Designer := TForm(Entity.Owner).Designer as IFormDesigner;
>   if Designer <> nil then...
>
> But what happens on a TDatamodule (I'll tell you I get and exception)
>
> How does a TDatamodule implement its designer interface

Use an IDesigner interface, not a IFormDesigner interface. You'll be getting
an invalid class cast exception. IFormDesigner is for forms and extends
IDesigner. Note that TCustomForm declares Designer as an IDesigner.

TTFN,
  Paul.


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to