Autor Beitrag
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: So 12.08.07 10:07 
Hallo,

ich habe ein konzeptionelles Problem momentan mit Delphi, wo mir keine Elegeante Lösung einfällt.

Und zwar baue ich ein Programm, was OOP sehr stark nutzen soll (wenns geht komplett). Von daher stehe ich vor folgendem Problem:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
unit Unit1;

interface

...

type
  TForm1 = class(TForm)
  private
    { Private-Deklarationen }
  public
    MyClass: TMyClass;
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
unit blubb;

interface

...

type
  TMyClass= class
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

implementation


Wie bekomme ich das zum laufen? Dadurch das beide Klassen im interface-Bereich stehen habe ich da ein problem :(
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 12.08.07 10:11 
Unit1:

ausblenden Delphi-Quelltext
1:
2:
3:
interface

Uses unit2;

Unit2:

ausblenden Delphi-Quelltext
1:
2:
3:
implementation

Uses Unit1;

_________________
Markus Kinzler.
Heiko Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: So 12.08.07 10:23 
AH stimmt. Mir ist gerade eine Kombination eingefallen wie es geht ;). Es liegt wahrscheinlich zu weit zurück das ich Delphi genommen habe ;).
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 12.08.07 10:51 
Besser wäre aber eine 3.Unit zu verwenden, welche von den beiden eingebunden wird.

_________________
Markus Kinzler.
Heiko Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: So 12.08.07 10:57 
Wie meinst du das?
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: So 12.08.07 11:00 
Zwischenfrage...wo braucht denn in dem Beispiel von oben die Unit blubb die andere? Wo ist denn da die Überkreuzung?

_________________
We are, we were and will not be.
Heiko Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: So 12.08.07 11:08 
In dem Falle hier ist es noch nicht. Aber an einer Stelle habe ich das Problem, dass als Parameter eine andere Klasse übergeben werden soll. An dieser Stelle entsteht die Überkreuzung.