Getting component's name from notification parameter?

From: Raptor (bogus_at_none.com)
Date: 01/29/05


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