[Lazarus] TShiftstate

Alex du Plessis alexdup01 at telkomsa.net
Wed Aug 6 17:41:05 CEST 2008


Of course, that was completely dumb of me >  Why I did not notice that 
is beyond me. 

My apologies

Alex

Howard Page-Clark wrote:
> 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
>>
>>     
>




More information about the Lazarus mailing list