AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

problem with accessing value

Ein Thema von question · begonnen am 24. Aug 2013 · letzter Beitrag vom 24. Aug 2013
 
question

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

problem with accessing value

  Alt 24. Aug 2013, 10:25
Dear All,
I have two units, Unit1 and Unit2 , i would like to access a boolean from Unit1 to Unit2 , i have tried it in the following way, but i have got the error "Zugriffsverletzung bei Adresse 023C4B58 in Modul 'Test.exe'. Lesen von Adresse 0000"

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);
var
  f : TCalculation ; // i have created an instance of TCalculation    
begin
if f.Newvalue = True then // i have called the boolean
//check the condition
End;
could you please tell me ,how can i make it works?
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:37 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz