Einzelnen Beitrag anzeigen

question

Registriert seit: 17. Apr 2013
97 Beiträge
 
#10

AW: ein objekt von mehreren forms benutzen..

  Alt 24. Aug 2013, 23:23
Dear All,

I have two class, TCalculation and TAccounts, i would like to access one object from one class to another,I have informed that AssignTo would be the appropriate to use, could you please pointing me from the following example, how to use AssignTo in this case

Code:
//Unit1
Unit Unit1
type TCalculation = class(TForm)
  private
  protected
   FNewvalue: Boolean;
  public
   property Newvalue: Boolean read FNewvalue;
   
  end;

//Unit2
Unit Unit2
type Taccounts = class(TForm)

 interface

uses
  Unit1
   
  private
  protected
  public
    procedure Checkvalue(Sender: TObject);
  end;

implementation

procedure Taccounts .Checkvalue(Sender: TObject);
begin
//here i want to acces the Boolean (FNewvalue) from Unit1
// i would like to mention that, i need the varable with its value
End;
  Mit Zitat antworten Zitat