Autor Beitrag
Bockscar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 105



BeitragVerfasst: Do 02.02.06 10:47 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
function Tcroupier.showbetamount:integer;
begin
showbetamount := self.Fbetamount;
end;



Habe eien Unit die die private variable Fbetamount hat und eine funktion in einer anderen unit die diese funktoin oben aufruft um an Fbetamount zu kommen.
zb. amount := croupier.showbetamount;

aber ich kriege da einen accessfehler oder so ... ist etwas falsch daran?


Danke und Gruß
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Do 02.02.06 10:50 
user profile iconBockscar hat folgendes geschrieben:
aber ich kriege da einen accessfehler oder so


Oder so? :gruebel: Der genaue Fehler würde weiterhelfen, zumal ich nicht ganz verstehe, was du eigentlich sagen willst.

AXMD
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Do 02.02.06 11:03 
Tcroupier = class ( ...

...
property betamount: <typ> read Fbetamount;

_________________
Markus Kinzler.
MrSaint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1033
Erhaltene Danke: 1

WinXP Pro SP2
Delphi 6 Prof.
BeitragVerfasst: Do 02.02.06 11:30 
Wenn die Funktion nur diese eine Zeile hat liegt nahe, dass du noch kein Objekt von der Klasse erzeugt hast.



MrSaint

_________________
"people knew how to write small, efficient programs [...], a skill that has subsequently been lost"
Andrew S. Tanenbaum - Modern Operating Systems