AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Problem beim Erstellen einer klasse

Ein Thema von Axxus · begonnen am 24. Okt 2006 · letzter Beitrag vom 26. Okt 2006
 
Axxus

Registriert seit: 3. Okt 2006
212 Beiträge
 
Turbo Delphi für Win32
 
#1

Problem beim Erstellen einer klasse

  Alt 24. Okt 2006, 19:20
Hi Delphianer

Ich fang grad an ma was mir Klassen zu amchen aber ich komm net weiter seht euch ma den Quelltext an und sagt mir was da falsch ist

Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TKonsole_Form = class(TForm)
    Konsole_Edit: TEdit;
    Konsole_Memo: TMemo;
    Konsole_Button: TButton;
    procedure Konsole_ButtonClick(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

type
  TFormelsammlung = class(TObject)
    {Variablen}
     Var_Konsole_Layout_Form_color_Background,
     Var_Konsole_Layout_Form_color_Background_Change1,
     Var_Konsole_Layout_Form_color_Background_Change2,
     Var_Konsole_Layout_Form_color_Background_Change3 : String;

    {Methoden}
    Constructor Create;
    procedure Set_Konsole_Layout_Form_color_Background (Txt: String);
    function Get_Konsole_Layout_Form_color_Background : String;
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Konsole_Form: TKonsole_Form;
  Formelsammlung: TFormelsammlung;
  Eingabe : String;

implementation

{$R *.dfm}

Constructor TFormelsammlung.Create;
begin
  inherited Create;
end;

procedure TFormelsammlung.Set_Konsole_Layout_Form_color_Background(Txt: string);
begin
  Var_Konsole_Layout_Form_color_Background := (Txt);
  Var_Konsole_Layout_Form_color_Background_Change1 := copy(Var_Konsole_Layout_Form_color_Background, 1, 2);
  Var_Konsole_Layout_Form_color_Background_Change2 := copy(Var_Konsole_Layout_Form_color_Background, 3, 4);
  Var_Konsole_Layout_Form_color_Background_Change3 := copy(Var_Konsole_Layout_Form_color_Background, 5, 6);
  Var_Konsole_Layout_Form_color_Background := '$' + Var_Konsole_Layout_Form_color_Background_Change3 + Var_Konsole_Layout_Form_color_Background_Change2 + Var_Konsole_Layout_Form_color_Background_Change1;
end;

function TFormelsammlung.Get_Konsole_Layout_Form_color_Background;
begin
  Konsole_Form.Color := (stringtocolor (Var_Konsole_Layout_Form_color_Background));
end;

procedure TKonsole_Form.Konsole_ButtonClick(Sender: TObject);
begin
Formelsammlung.Set_Konsole_Layout_Form_color_Background (Konsole_Edit.Text);
Formelsammlung.Get_Konsole_Layout_Form_color_Background;
end;

end.
So Starten geht aber wenn ich dann den RGB wehrt ins edit eintrage und auf den Button drücke dann Kommt folgende Fehlermldung:

Im Project1.exe ist ein exeption der Klasse EAccesViolation mit der Meldung 'Zugriffsverletzung bei Addresse 004046C8 in Modul 'Project1.exe'. Schreiben von Addresse 00000004' aufgetreten

weiß einer was da los is und wie ich das beheben kann????

Danke im Vorraus

Axxus
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:20 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz