Autor Beitrag
Soapy
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 88

Windows 2000
Delphi 2005 Personal
BeitragVerfasst: Mo 16.06.08 12:57 
Also... mal wieder ein Basic-Problem!

Ich will eine Stringlist deklarieren!

Ich bin der festen Überzeugung, dass ich das schonmal geschafft habe!

Jetzt habe ich folgendes deklariert:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
...
    Stringlist: TStringlist;
...
procedure TForm12.FormCreate(Sender: TObject);
begin
Stringlist.Create;
Stringlist.Add('blablabla');
end;

end.


Jetzt sagt mein delphi (2005 personal) aber:

ausblenden Quelltext
1:
Feld Form12.Stringlist besitzt keine entsprechende Komponente. Soll die Deklaration entfernt werden?					


Allerdings funktioniert die Programmierhilfe für die stringlist und alles! Nur beim Kompilieren gibt Delphi diese (o.g.) Fehlermeldung aus!

_________________
Linux wird nie das meistinstallierte Betriebssystem sein, wenn man bedenkt, wie oft man Windows neu installieren muss!
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 16.06.08 13:03 
Moin!

Probier das mal so: ;)
ausblenden Delphi-Quelltext
1:
Stringlist := TStringList.Create;					


cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Soapy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 88

Windows 2000
Delphi 2005 Personal
BeitragVerfasst: Mo 16.06.08 13:07 
Thx für die schnelle Antwort! Aber an der Fehlermeldung hat sich nix geändert!
Immer noch die gleiche!



---EDIT---

Also die Fehlermeldung kommt bei jedem Kompilieren aber es funktioniert! Danach steht 'blablabla' in der stringlist!

_________________
Linux wird nie das meistinstallierte Betriebssystem sein, wenn man bedenkt, wie oft man Windows neu installieren muss!


Zuletzt bearbeitet von Soapy am Mo 16.06.08 13:09, insgesamt 1-mal bearbeitet
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Mo 16.06.08 13:09 
Poste mal bitte deine komplette Unit..

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
Soapy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 88

Windows 2000
Delphi 2005 Personal
BeitragVerfasst: Mo 16.06.08 13:12 
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
unit exchange;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, Menus, ComCtrls, RichEditHighlight;

type
  TForm12 = class(TForm)
    Chat: TMemo;
    Check: TCheckBox;
    Panel1: TPanel;
    RichEditSyntax1: TRichEditSyntax;
    ListBox1: TListBox;
    Memo1: TMemo;
    Stringlist: TStringlist;
    procedure FormCreate(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form12: TForm12;

implementation

{$R *.dfm}

procedure TForm12.FormCreate(Sender: TObject);
begin
Stringlist := TStringList.Create;
Stringlist.Add('blablabla');
Memo1.Lines := Stringlist;
end;

end.


So kommt diese Fehlermeldung immer!

Wenn ich die Stringlist für die FormCreate deklariere, kommt die meldung net!

Muss ich die Stringlist unter public deklarieren? da gehts nämlich auch! Ich brauch die im ganzen Projekt!

_________________
Linux wird nie das meistinstallierte Betriebssystem sein, wenn man bedenkt, wie oft man Windows neu installieren muss!


Zuletzt bearbeitet von Soapy am Mo 16.06.08 13:17, insgesamt 1-mal bearbeitet
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 16.06.08 13:17 
Moin!

Mach das mal so: :idea:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
type
  TForm12 = class(TForm)
    Chat: TMemo;
    Check: TCheckBox;
    Panel1: TPanel;
    RichEditSyntax1: TRichEditSyntax;
    ListBox1: TListBox;
    Memo1: TMemo;
    procedure FormCreate(Sender: TObject);
    procedure FormDestory(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    Stringlist: TStringlist;
  end;

//...

procedure TForm12.FormCreate(Sender: TObject);
begin
  Stringlist := TStringList.Create;
  Stringlist.Add('blablabla');
  Memo1.Lines.Assign(Stringlist);
end;

procedure TForm12.FormDestroy(Sender: TObject);
begin
  Stringlist.Free;
end;
cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Soapy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 88

Windows 2000
Delphi 2005 Personal
BeitragVerfasst: Mo 16.06.08 13:19 
hey danke!

Man... Wirklich ein Anfänger-Problem!

Sry...

_________________
Linux wird nie das meistinstallierte Betriebssystem sein, wenn man bedenkt, wie oft man Windows neu installieren muss!
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 16.06.08 13:38 
Moin!

Markierst du den Thread noch entsprechend, wenn dein Problem gelöst ist? Danke. ;)

cu
Narses

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