Autor Beitrag
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: So 24.06.07 14:06 
Hallo liebe Community,

Ich hab folgendes problem. Ich erzeuge mir zur Laufzeit mehrere Forms selbst und wenn ich jetzt das mainform schließe kommt natürlich eine Exception. Ich hab mir gedacht die verhindere ich indem ich immer wenn ich ein forular erzeuge einen Pointer ins array schreibe der auf dieses Formular zeigt. wenn das das MainForm geschlossen wird gehe ich mittels for-schleife jeden Pointer durch und schließe das Formular.

Nur leider geht das nicht. Wie müsste das so ungefähr aussehen?? Gibts eine bessere Methode??

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


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: So 24.06.07 14:08 
Mache die MainForm zum Owner der anderen Formulare

_________________
Markus Kinzler.
elundril Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: So 24.06.07 14:15 
und könnt ich das machen?

so??
ausblenden Delphi-Quelltext
1:
FrmDyn.Owner:=FrmMain					


Und wie kann ich dann darauf zugreifen???

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


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: So 24.06.07 14:20 
Wie meinst du darauf zugreifen? Der Owner gibt ja seine untergeordneten Klassen frei.

_________________
Markus Kinzler.
elundril Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: So 24.06.07 14:27 
:autsch: :autsch: :autsch: :autsch: :autsch: :autsch:

Das haben wir im Infounterricht lang und breit besprochen!!

Die Hitze!!!

Stimmt danke!

und das Codeschnipsel hat gestimmt?

lg elundril