Re: OpenPictureDialog Problems
- From: erewhon@xxxxxxxxxx (J French)
- Date: Wed, 27 Jul 2005 11:02:37 +0000 (UTC)
On 27 Jul 2005 01:25:28 -0700, "alanglloyd@xxxxxxx"
<alanglloyd@xxxxxxx> wrote:
>Run Time Type Information (RTTI) which is used for "as" and "is"
>operators is relatively slow. So once an object has been confirmed to
>be of a particular type, then use a simple typecast on its reference.
>So code ...
>
>begin
> if Sender is TManyShape then
> begin
> fCurrentShape :=TManyShape(Sender);
> FCurrentShape.Invalidate;
> if ssRight in Shift then
> TManyShape(Sender).Tag := RIGHT_BUTTON_DOWN
FCurrentShape.Tag := RIGHT_BUTTON_DOWN
Surely that is more consistent <smirk>
>Even though we have oodles of computing power, let's not waste it with
>loose programming habits <g>.
True, also it makes the code so much cleaner
- also the funny thing is that clean code normally works faster than
obfuscated code
>Alan Lloyd
>
.
- Follow-Ups:
- Re: OpenPictureDialog Problems
- From: Henry Bartlett
- Re: OpenPictureDialog Problems
- References:
- OpenPictureDialog Problems
- From: cybatech
- Re: OpenPictureDialog Problems
- From: Maarten Wiltink
- Re: OpenPictureDialog Problems
- From: cybatech
- Re: OpenPictureDialog Problems
- From: Henry Bartlett
- Re: OpenPictureDialog Problems
- From: Rob Kennedy
- Re: OpenPictureDialog Problems
- From: Henry Bartlett
- Re: OpenPictureDialog Problems
- From: cybatech
- Re: OpenPictureDialog Problems
- From: Henry Bartlett
- Re: OpenPictureDialog Problems
- From: cybatech
- Re: OpenPictureDialog Problems
- From: Henry Bartlett
- Re: OpenPictureDialog Problems
- From: alanglloyd@xxxxxxx
- OpenPictureDialog Problems
- Prev by Date: Re: OpenPictureDialog Problems
- Next by Date: Changing the color of the active title bar
- Previous by thread: Re: OpenPictureDialog Problems
- Next by thread: Re: OpenPictureDialog Problems
- Index(es):