property write method's problem....

Here is the Component.

unit Untitle;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs,
  StdCtrls;

type
  TUntitle = class(TComponent)
  private
    { Private declarations }
    FIndicator : TEdit;
    FActive : Boolean;
    procedure SetIndicator(value : TEdit);
    procedure SetActive(value : Boolean);
  protected
    { Protected declarations }
  public
    { Public declarations }
  published
    { Published declarations }
    property Indicator : TEdit read FIndicator write SetIndicator;
    property Active : Boolean read FActive write SetActive;
  end;

procedure Register;

implementation

procedure TUntitle.SetActive(value : Boolean);
begin
  if FActive <> value then
    begin
      if FIndicator = nil then
        showmessage('Nil')
      else
        showmessage(FIndicator.text);
      FActive := value;
    end;
end;

procedure TUntitle.SetIndicator(value : TEdit);
begin
  if FIndicator <> Value then
    begin
      FIndicator := Value;
    end;
end;

procedure Register;
begin
  RegisterComponents('Test', [TUntitle]);
end;

end.

After Intalled TUntitle, I created a blank project, and then I dropped a

edit on form1, and then linked it to Untitle1, and then Pressed F9, I
found Untitle1 will show "Nil", why ? and How to solve the problem ?

Pls Help Me !

Return to sat...@vol.net

Steve Mcmanaman

Cheat Developer/Consultant
Ada Computer System Ltd.

--
 /\_/\   /\_/\   /\_/\
( @ @ ) ( @ @ ) ( + + )
  -+-      0       ~