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
Antwort Antwort
Benutzerbild von DeddyH
DeddyH

Registriert seit: 17. Sep 2006
Ort: Barchfeld
27.660 Beiträge
 
Delphi 12 Athens
 
#1

AW: problem with accessing value

  Alt 24. Aug 2013, 12:29
This is not unexpected, you create a new instance, therefore its properties are set to default unless something happens which changes them.

[edit] BTW: You should never compare to true or false, this can lead to unexpected results.
if var = true then -->
if var then [/edit]
Detlef
"Ich habe Angst vor dem Tag, an dem die Technologie unsere menschlichen Interaktionen übertrumpft. Die Welt wird eine Generation von Idioten bekommen." (Albert Einstein)
Dieser Tag ist längst gekommen
  Mit Zitat antworten Zitat
question

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

AW: problem with accessing value

  Alt 24. Aug 2013, 15:37
Is it also possible to create a class exactly as it is(not as a new instance), i mean i want to create a class of TCalculation so that i can access any of its variable with the exact value from class of TAccounts

i even dont know whether its possible or not, i was looking in tutorial but dont get any idea yet, can you please help me ?
  Mit Zitat antworten Zitat
Benutzerbild von DeddyH
DeddyH

Registriert seit: 17. Sep 2006
Ort: Barchfeld
27.660 Beiträge
 
Delphi 12 Athens
 
#3

AW: problem with accessing value

  Alt 24. Aug 2013, 15:48
You have 2 different classes derived from TPersistent with similar properties? In that case you can override the "Assign" or even better the "AssignTo"-Method. This should do exactly what you want. There should be examples for both methods in this forum: Hier im Forum suchenAssign, Hier im Forum suchenAssignTo.
Detlef
"Ich habe Angst vor dem Tag, an dem die Technologie unsere menschlichen Interaktionen übertrumpft. Die Welt wird eine Generation von Idioten bekommen." (Albert Einstein)
Dieser Tag ist längst gekommen
  Mit Zitat antworten Zitat
question

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

AW: problem with accessing value

  Alt 24. Aug 2013, 15:56
Thanks, i am looking on it.

By the way, Can you please suggest me, any Book/online learning material to learn Delphi with MYSQL(from beginner to expert), even it need to buy ,i will buy it,but i am looking for it, i have a book but it is in German language, a learning material in English would be easily understable in my situation.
  Mit Zitat antworten Zitat
Antwort Antwort


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 22:27 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