Autor Beitrag
Coder
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1383
Erhaltene Danke: 1

WinXP
D2005 PE
BeitragVerfasst: Sa 16.12.06 22:13 
Hi
Wenn ich with EineKlasse.Create... do schreibe wird ein namenloses Elemente erstellt welches nur in diesem with do Block vorhanden ist.
Wie kann ich jetz auf dieses Element direkt zugreifen?
z.B. Etwas := EineFunktion(Element);
Soetwas ähnliches wie self war das. :gruebel:

MfG
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Sa 16.12.06 22:40 
Naja, self ist normalerweise die Form, in der du gerade arbeitest.
Machs dir doch viel einfacher und weise dem ganzen ne Variable zu, dann hast das auch nach dem with...do Block.
Ich meine:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
var Obj: TObject;

....
...
..
.

Obj := TObject.Create;
with Obj do begin
...
end;


Gruß alias5000

_________________
Programmers never die, they just GOSUB without RETURN
Coder Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1383
Erhaltene Danke: 1

WinXP
D2005 PE
BeitragVerfasst: Sa 16.12.06 22:43 
Ist halt etwas länger.
Dachte da gäbe es etwas.

MfG
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: So 17.12.06 00:35 
Moin!

Ich hatte hier schonmal diese Frage gestellt. ;) Gleiches Ergebnis. 8)

Scheint, also lohne sich doch mal ein FAQ-Beitrag.

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.