Getting component's name from notification parameter?
From: Raptor (bogus_at_none.com)
Date: 01/29/05
- Next message: Rob Kennedy: "Re: Getting component's name from notification parameter?"
- Previous message: Raptor: "Re: Differences in using Constructor and unit Initialization block"
- Next in thread: Rob Kennedy: "Re: Getting component's name from notification parameter?"
- Reply: Rob Kennedy: "Re: Getting component's name from notification parameter?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 28 Jan 2005 19:46:20 -0800
I'm doing fine with obtaining a component's name when scanning thus:
with Application.Components[i] do
begin
for j := 0 to ComponentCount - 1 do
begin
aName := Components[j].Name;
But I'm not able to derive the components name from the aComponent parameter
in:
procedure TTranslate.Notification (aComponent: TComponent; Operation:
TOperation);
begin
inherited Notification(AComponent, Operation);
if (Operation = opInsert) then
begin
aOwnerName := TComponentName(aComponent.Owner.Name);
The above gets me the name of the form and
aComponent.ClassName gets me the classname but
aName := aComponent.Name;
or TComponentName(aComponent.Name);
only gets me air.
What's the story? PropInfo doesn't seem to be getting me there either.
Raptor
- Next message: Rob Kennedy: "Re: Getting component's name from notification parameter?"
- Previous message: Raptor: "Re: Differences in using Constructor and unit Initialization block"
- Next in thread: Rob Kennedy: "Re: Getting component's name from notification parameter?"
- Reply: Rob Kennedy: "Re: Getting component's name from notification parameter?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]