Stacey

Pls refer to my earlier mail I was talking about using the RTTI function
GetEnumName
to populate a stringlist (such as a set of radio buttons) from a EnumType so
that ItemIndex
can be used sensibly

The problem with
TEnumType = (etVB, etDelphi, etC++, etC, etJava);
Is not a dup name it's the ++

Regards
Neven

----- Original Message -----
From: Stacey Verner <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Wednesday, 23 February 2000 09:52
Subject: RE: [DUG]: VB Like Case statement


> The general rule we use is to prefix the enumerations with a code from the
> name of the enumeration type.
>
> TEnumType = (etVB, etDelphi, etC++, etC, etJava);
>
> This usually gets around the problem of properties with same name.
>
> > -----Original Message-----
> > From: Neven MacEwan [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, 23 February 2000 09:41
> > To: Multiple recipients of list delphi
> > Subject: Re: [DUG]: VB Like Case statement
> >
> >
> > Thanks Aaron
> >
> > But why isn't TEnumType = (VB,Delphi,C++,C,Java) valid?
> >
> > and would it be so hard?
> >
> > also I found that  TEnumType =  (Left,Right,Up,Down) was valid
> >
> > but
> > case TEnumType(OrdVal)
> >   Left: ....; // error here as Left is property in scope of form
> >
> > end;
> >
> > This seems to be a scoping problem
> >
> > I'm not suggesting a total relax of rules (ie spaces in names
> > ala SQL7)
> > but it is frustrating that this is almost there but not really usable
> >
> > Regards
> > Neven
> >
> > ----- Original Message -----
> > From: Aaron Scott-Boddendijk <[EMAIL PROTECTED]>
> > To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
> > Sent: Tuesday, 22 February 2000 18:31
> > Subject: Re: [DUG]: VB Like Case statement
> >
> >
> > > > Maybe I should have put it on the wish list for D6!
> > > > If they extended Delphi to allow more characters in
> > enumerated type
> > > > descriptions it would get past the
> > > > old string/ordinal problem
> > >
> > > Their best solution to beat the 'ordinal type' limitation
> > of the case
> > statement
> > > is to extend the compiler to produce parse trees using
> > cascaded 'if-else'
> > as
> > > the non-ordinal implementation of case.  Since delphi
> > doesn't have the
> > > fall-through case features of the C switch statement
> > there's no semantic
> > > difference - all case elements are required to be constants
> > so there's no
> > issue
> > > with order of evaluation or evaluation at all...
> > >
> > > --
> > > Aaron@home
> > >
> > >
> > >
> > --------------------------------------------------------------
> > ------------
> > -
> > >     New Zealand Delphi Users group - Delphi List -
> > [EMAIL PROTECTED]
> > >                   Website: http://www.delphi.org.nz
> > >
> >
> > --------------------------------------------------------------
> > -------------
> >     New Zealand Delphi Users group - Delphi List -
> > [EMAIL PROTECTED]
> >                   Website: http://www.delphi.org.nz
> >
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
>

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

Reply via email to