[Lazarus] TShiftstate
Howard Page-Clark
hdpc at talktalk.net
Wed Aug 6 17:31:53 CEST 2008
Hi
Because shift is of type set (not an integer or some other variable type)
you cannot test for equality as you would for integer variables with the
algebraic "=" sign. The syntax needed is:
if (ssShift in shift) then .
Howard
----- Original Message -----
From: "Alex du Plessis" <alexdup01 at telkomsa.net>
To: "Lazarus mailing list" <lazarus at lazarus.freepascal.org>
Sent: Wednesday, August 06, 2008 4:15 PM
Subject: [Lazarus] TShiftstate
>I am trying to check a shift state in an onMouseUp event
>
> if shift=ssShift then
>
> but when I compile this I get an error
>
> E:\DataRoot\Projects\DelphiConversions\Mathparsers\LXExpParser\Source\lxmathstringgrid.pas(132,11)
> Error: Incompatible types: got "TShiftStateEnum" expected "TShiftState"
>
> When I look in classesh.inc (where it is defined) there is a strange
> definition
>
> {$packset 1}
> TShiftState = set of TShiftStateEnum;
> {$packset default}
>
> How do I check my shift state and get around this compiler error?
>
> Regards
>
> Alex du Plessis
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
More information about the Lazarus
mailing list