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
Antwort Antwort
Seite 2 von 2     12   
mkinzler
(Moderator)

Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.851 Beiträge
 
Delphi 11 Alexandria
 
#11

Re: Problem beim Erstellen einer klasse

  Alt 25. Okt 2006, 17:58
Jein. Es ist kein Platzhalter/Makro, sondern ein Unterprogramm, welches aufgerufen wird und einen Wert zurückliefert.
Markus Kinzler
  Mit Zitat antworten Zitat
Axxus

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

Re: Problem beim Erstellen einer klasse

  Alt 25. Okt 2006, 18:41
JO heißt im KLartext

Sobald das Programm zu einer funktion kommt springt es dorthin berechnet was und das ergebniss gibt es dann an der stelle zurück *bling* *Kronleuchter angegangen*
ok danke
hab jetzt wieder ien problem
Es rtitt wieder ein Exeption auf

Delphi-Quellcode:
unit Matrix_Windows_Controler_Quelltext;

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 FormCreate(Sender: TObject);
    procedure FormDesrtoy(Sender: TObject);
    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,
     Var_Konsole_Layout_Memo_color_Background,
     Var_Konsole_Layout_Memo_color_Background_Change1,
     Var_Konsole_Layout_Memo_color_Background_Change2,
     Var_Konsole_Layout_Memo_color_Background_Change3 : String;
     Konsole_Memo: TMemo;

    {Methoden}
    Constructor Create;
    procedure Set_Konsole_Layout_Form_color_Background (Txt: String);
    function Get_Konsole_Layout_Form_color_Background : String;
    procedure Set_Konsole_Layout_Memo_color_Background (Txt: String);
    function Get_Konsole_Layout_Memo_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, 2);
  Var_Konsole_Layout_Form_color_Background_Change3 := copy(Var_Konsole_Layout_Form_color_Background, 5, 2);
  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 TFormelsammlung.Set_Konsole_Layout_Memo_color_Background(Txt: string);
begin
  Var_Konsole_Layout_Memo_color_Background := (Txt);
  Var_Konsole_Layout_Memo_color_Background_Change1 := copy(Var_Konsole_Layout_Memo_color_Background, 1, 2);
  Var_Konsole_Layout_Memo_color_Background_Change2 := copy(Var_Konsole_Layout_Memo_color_Background, 3, 2);
  Var_Konsole_Layout_Memo_color_Background_Change3 := copy(Var_Konsole_Layout_Memo_color_Background, 5, 2);
  Var_Konsole_Layout_Memo_color_Background := '$' + Var_Konsole_Layout_Memo_color_Background_Change3 + Var_Konsole_Layout_Memo_color_Background_Change2 + Var_Konsole_Layout_Memo_color_Background_Change1;

end;

function TFormelsammlung.Get_Konsole_Layout_Memo_color_Background;
begin
  Konsole_Memo.color := (stringtocolor (Var_Konsole_Layout_Memo_color_Background));
end;



procedure TKonsole_Form.FormCreate(Sender: TObject);
begin
Formelsammlung := TFormelsammlung.Create;
end;

procedure TKonsole_Form.Konsole_ButtonClick(Sender: TObject);
begin
Formelsammlung.Set_Konsole_Layout_Memo_color_Background (Konsole_Edit.Text);
Formelsammlung.Get_Konsole_Layout_Memo_color_Background;
end;


procedure TKonsole_Form.FormDesrtoy(Sender: TObject);
begin
Formelsammlung.Free;
end;



end.
Wisst ihr was los is wenn nötig geb ich auch noch die fehlermeldung an
  Mit Zitat antworten Zitat
mkinzler
(Moderator)

Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.851 Beiträge
 
Delphi 11 Alexandria
 
#13

Re: Problem beim Erstellen einer klasse

  Alt 25. Okt 2006, 18:47
Zitat:
Wisst ihr was los is wenn nötig geb ich auch noch die fehlermeldung an
und am Besten noch die Zeile, in der die Exception auftritt
Markus Kinzler
  Mit Zitat antworten Zitat
Axxus

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

Re: Problem beim Erstellen einer klasse

  Alt 26. Okt 2006, 11:38
Sorry das es erst jetzt kommt

Fehlermeldung:

In Project Matrix_Windows_controler.exe ist ein exeption der Klasse EAccessViolation mit der Meldung
'zugriffsverletzung bei Addresse 00438124 in modul Matrix_Windows_controler.exe lesen von Adresse 00000070' Aufgetreten

Zeile gibt er net an

Wisst ihr worans liegt???

Axxus
  Mit Zitat antworten Zitat
Jürgen Thomas

Registriert seit: 13. Jul 2006
Ort: Berlin
750 Beiträge
 
#15

Re: Problem beim Erstellen einer klasse

  Alt 26. Okt 2006, 13:19
Hallo,
dafür gibt es den Debugger: Haltepunkt (Breakpoint) auf "verdächtige" Zeilen setzen und schrittweise durchgehen - dann wird es an einer bestimmten Zeile knallen, und dort ist das Problem.

Wenn Du keine Idee hast, wo das Problem sitzen könnte, dann setze den Haltepunkt möglichst früh.

AccessViolation deutet grundsätzlich darauf hin, dass Du ein Objekt ansprechen willst, das noch nicht erzeugt wurde.

Gruß Jürgen
#D mit C# für NET, dazu Firebird
früher: Delphi 5 Pro, Delphi 2005 Pro mit C# (also NET 1.1)
Bitte nicht sauer sein, wenn ich mich bei Delphi-Schreibweisen verhaue; ich bin inzwischen an C# gewöhnt.
  Mit Zitat antworten Zitat
KrasserChecker

Registriert seit: 21. Jul 2004
120 Beiträge
 
#16

Re: Problem beim Erstellen einer klasse

  Alt 26. Okt 2006, 13:25
Vielleicht solltest Du einfach mal versuchen der Variablen (die im übrigen "Feld" genannt wird...) "Konsole_Memo" aus der Klasse "TFormelsammlung" einen Wert zuzuweisen.

Sonst greifst Du nämlich in der Methode "Get_Konsole_Layout_Form_color_Background" ins Leere.

Etwa so:
Delphi-Quellcode:
procedure TKonsolen_Form.FormCreate(Sender: TObject);
begin
  Formelsammlung:= TFormelsammlung.Create;
  Formelsammlung.Konsole_Memo := Konsole_Memo;
end;
  Mit Zitat antworten Zitat
Axxus

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

Re: Problem beim Erstellen einer klasse

  Alt 26. Okt 2006, 14:21
Wieder was gelernt danke

Axxus
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 2     12   


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 18:18 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