Autor Beitrag
blackbirdXXX

ontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1077
Erhaltene Danke: 1

Ubuntu Dapper

BeitragVerfasst: Fr 19.09.03 19:26 
Ich möchte eine memo erstellen auf der der User Quelltexte einträgt und dann speichert. So eine Art MDI Aber ohne MDI.
Ich scheitere nur an der Erstellung der Memo. Der Rest müsste gehen.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
var
  MainForm: TMainForm;
  Docname: array[1..MaxID] of TMemo;
  DocId: Integer;

implementation

{$R *.dfm}

function NewDokument(title: String; Id: Integer): Boolean;
begin
 if id < MaxID then
  begin
   DocName[Id].Create(MainForm);
   MainForm.DocList.Items.Add(title)
  end;
end;


Die Fehlermeldung kommt wenn ich die NewDokument aufrufen:

Zitat:
Liquid HTML

Access violation at address 00476D65 in module 'LH.exe'. Read of address 00000000.

Was mach ich da falsch?

_________________
Klein, schwarz und ärgert Techniker? Jumper!
aogwaba
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 109



BeitragVerfasst: Sa 20.09.03 09:32 
Du musst die Instanzen erstellen. Änder mal das:
ausblenden Delphi-Quelltext
1:
DocName[Id].Create(MainForm);					

in:
ausblenden Delphi-Quelltext
1:
2:
DocName[id]:=TMemo.create(MainForm);
DocName[id].parent:=MainForm;

cu
waba

Moderiert von user profile iconTino: Delphi-Tags hinzugefügt.
blackbirdXXX Threadstarter

ontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1077
Erhaltene Danke: 1

Ubuntu Dapper

BeitragVerfasst: So 21.09.03 11:33 
:D Danke. Wieder ein blöder Fehler gelöst.

_________________
Klein, schwarz und ärgert Techniker? Jumper!