Am 27.07.2015 11:37 schrieb "Mark Morgan Lloyd" <
markmll.laza...@telemetry.co.uk>:
>
> Now obviously I could have a separate property holding an enumeration,
but it's a pity that it's not possible to do something like
>
> case MainForm.OutputComponent of
> TListBox: begin end;
>
Am 27.07.2015 12:06 schrieb "Mark Morgan Lloyd" <
markmll.laza...@telemetry.co.uk>:
>
> Péter Gábor wrote:
>>
>> If you use the classname property you can:
>>
>> case Sender.classname of
>> 'TCheckBox': ShowMessage('This is a TCheckBox');
>> end;
>
>
> Good point. I wonder if that's mode-specific
2015-07-27 13:33 keltezéssel, Michael Schnell írta:
>
> I suppose you meant
>
> if Sender is TButton then { do something} ;
>
> -Michael
>
Yes!
--
Péter Gábor
p...@freemail.hu
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http:/
On Mon, Jul 27, 2015 at 6:37 AM, Mark Morgan Lloyd
wrote:
> JuuS wrote:
>>
>> On 07/27/2015 09:31 AM, Mark Morgan Lloyd wrote:
>>>
>>> Péter Gábor wrote:
Sorry!
I was "misreading" your mail... you want to know the type of them.
You can compare the type of them:
i
On 07/27/2015 07:47 AM, Péter Gábor wrote:
if Sender = TButton then { do something} ;
I suppose you meant
if Sender is TButton then { do something} ;
OP: If you want to deal with a lot of different classes that might be the
sender, it might help to define an array of these classes (types) an
Sorry about that - that message was supposed to be sent in reply to a message
rhar came in right before one that was for this list. My Note 4 thought I was
trying to reply a thread in the Lazarus group.
-Chris
On Jul 27, 2015 7:23 AM, Chris Kelling wrote:
>
> We have one in Room B. It is Ed S
We have one in Room B. It is Ed Sax's old machine. It is an early model that
has the chicklett keyboard. About the only distinction tge PC Jr has is that is
was a finacial failure. Both style of keyboards are wireless, but you had to
have the keyboard aimed directly at the IR receiver on the PC.
Péter Gábor wrote:
If you use the classname property you can:
case Sender.classname of
'TCheckBox': ShowMessage('This is a TCheckBox');
end;
Good point. I wonder if that's mode-specific (language manual simply
says "Free Pascal allows").
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT
If you use the classname property you can:
case Sender.classname of
'TCheckBox': ShowMessage('This is a TCheckBox');
end;
2015-07-27 09:31 keltezéssel, Mark Morgan Lloyd írta:
> Péter Gábor wrote:
>>
>> if Sender = TButton then { do something} ;
>
> Can this be elegantly put into a case statem
On Mon, 27 Jul 2015, Mark Morgan Lloyd wrote:
JuuS wrote:
On 07/27/2015 09:31 AM, Mark Morgan Lloyd wrote:
Péter Gábor wrote:
Sorry!
I was "misreading" your mail... you want to know the type of them.
You can compare the type of them:
if Sender = TButton then { do something} ;
Can this be
JuuS wrote:
On 07/27/2015 09:31 AM, Mark Morgan Lloyd wrote:
Péter Gábor wrote:
Sorry!
I was "misreading" your mail... you want to know the type of them.
You can compare the type of them:
if Sender = TButton then { do something} ;
Can this be elegantly put into a case statement?
Hi, I just
On 07/27/2015 09:31 AM, Mark Morgan Lloyd wrote:
> Péter Gábor wrote:
>> Sorry!
>> I was "misreading" your mail... you want to know the type of them.
>>
>> You can compare the type of them:
>>
>> if Sender = TButton then { do something} ;
>
> Can this be elegantly put into a case statement?
>
H
Péter Gábor wrote:
Sorry!
I was "misreading" your mail... you want to know the type of them.
You can compare the type of them:
if Sender = TButton then { do something} ;
Can this be elegantly put into a case statement?
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above
Am 27.07.2015 07:48 schrieb "Péter Gábor" :
>
> Sorry!
> I was "misreading" your mail... you want to know the type of them.
>
> You can compare the type of them:
>
> if Sender = TButton then { do something} ;
The correct operator is "is" not "=".
Regards,
Sven
--
_
Sorry!
I was "misreading" your mail... you want to know the type of them.
You can compare the type of them:
if Sender = TButton then { do something} ;
or you can get the name of the class
ShowMessage( Sender.classname );
2015-07-27 07:30 keltezéssel, Péter Gábor írta:
> If you typecast someth
If you typecast something you can use the fields and properties of the
type you use for casting, for example:
if TCheckBox(Sender).Checked then {do_something} ;
or
if TCheckBox(Components[I]).Checked then {do_something} ;
2015-07-27 00:31 keltezéssel, Bob B. írta:
> how to get Type of Sender
Thanks.
Bob B.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
17 matches
Mail list logo