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