Thanks, that works. I found several other places where those declarations
are used. So it's not OT. For instance:

{$IFDEF USE_SSL}
    THttpConnection = class(TSslWSocketClient)
{$ELSE}
    THttpConnection = class(TWSocketClient)
{$ENDIF}

All those declarations cause the IDE to display an additional
private var, here THttpConnection in the object inspector.

If you change it to:

{$IFDEF USE_SSL}                
    TBaseHttpConnection = TSslWSocketClient;
{$ELSE}
    TBaseHttpConnection = TWSocketClient;
{$ENDIF}
 THttpConnection = class(TBaseHttpConnection)    

it makes the IDE happy. However lists TBaseHttpConnection 
under Types of course.

Francois, what do you think? 


Maurizio Lotauro wrote:
> On 23-Dec-05 18:57:05 Arno Garrels wrote:
> 
>> Maurizio Lotauro wrote:
> 
> [...]
> 
>>> But that error is on a dialog box instead on the message windows. In
>>> this case TForm1 is used in the dfm so probaly the compiler doesn't
>>> like the define "around" cleass declaration.
>>> 
>>> I'm still using D5.
> 
>> I tried it with D5, it is the same as in D7.
>> Obviously I'm trying something that is not possible :(
> 
> I think that the problem is the IDE, not the compiler, because
> probably it doesn't take into account the conditionals. This explain
> why the error message is in a dialog box instead in the message
> window. So it should compile outside Delphi, but not very
> confortable.
> 
> Try this:
> 
> type
>   TMyForm = class(TForm);
> 
> {$IFDEF TEST}
>   TMyParentForm = TForm;
> {$ELSE}
>   TMyParentForm = class(TMyForm);
> {$ENDIF}
> 
>   TForm1 = class(TMyParentForm)
>   private
>     { Private-Deklarationen }
>   public
>     { Public-Deklarationen }
>   end;
> 
> This doesn't raise any error :-)
> 
> 
> Bye, Maurizio.
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to