changed:boolean;
定义的不是地方?

解决方案 »

  1.   

      private
          changed:boolean;
        { Private declarations }
      

  2.   

    你的变量名字和TForm的Changed过程有冲突!
      

  3.   

    建议你不要使用changed作为变量,换一个变量名试试。
      

  4.   

    因为CHANGED是一个FORM的PROCEDURE,如form1.changed;
    因此你在调用时系统会提示不能赋值,所以建议改个变量名
    如CHANGEDA就可以了
      

  5.   

    TControl.ChangedTControl See also
    Sends a CM_CHANGED message to the control.procedure Changed;DescriptionCall Changed after changing the properties of the control in a way that affects the properties of a parent object. Changed sends a CM_CHANGED message back to the control. If the control is a windowed control, this message is bubbled up to the parent so that it can make any necessary adjustments.晚了一点。
      

  6.   

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    Unit1.changed:=true;
    end;procedure TForm1.Button3Click(Sender: TObject);
    begin
    my(Unit1.changed);
    end;