AGB  ·  Datenschutz  ·  Impressum  







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

access value by Property

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

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

access value by Property

  Alt 22. Aug 2013, 16:31
I have two procedures in a fine with different parameters, i want to access the parameter from one procedure to another

procedure TForm1.Person (ID : Integer);
//here ID=20

procedure TForm1.btnOkClick(Sender: TObject);

from btnOkClick, i want to call the Form1.Person (ID);

but since the ID is not listed as a parameter in TForm1.btnOkClick(Sender: TObject); therefore i cannot access the ID with appropriate value
how can i do that

i have tried with property such as
Pivate
FNewID: Integer;
procedure Person(ID:Integer);
public
property NewID: Integer readFNewID write FNewID;

and in the procedure TForm1.Person (ID : Integer);

i have did

procedure TForm1.Person (ID : Integer);
FNewID := ID
but unfortunaltely it gives the following relsut

ID = 20;
FNewID = 0;
but i expected
ID= 20;
FNewID = 20;
could you please explain me how to do that
  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 08:04 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz