Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Probleme beim Zugriff auf Variable (https://www.delphipraxis.net/44957-probleme-beim-zugriff-auf-variable.html)

s.h.a.r.k 27. Apr 2005 14:09


Probleme beim Zugriff auf Variable
 
Hallo! Ich hab zwar grad im Forum gesucht, aber auf die Schnelle nicht gefunden! Ich hoffe, dass diese Thema nocht nicht angsprochen wurde: Und zwar habe ich folgendes Problem: ich habe eine globale Variable wie folgt defeniert:
Delphi-Quellcode:
type
  TMyFont = class
              Name:        String;
              Size:        Integer;
              Color:       TColor;
              Bold:        Boolean;
              Italic:      Boolean;
              Underline:   Boolean;
            end;
  TMyToolbar = class
              Standard:   TPoint;
              Explorer:   TPoint;
              Syntax:     TPoint;
            end;
  TSyntaxHighlighter = (hlFalse, hlCpp, hlPascal, hlHTML, hlPHP, hlJava);

  TAppConfig = class
              Font:            TMyFont;
              ShowLineNumber:  Boolean;
              WordWarp:        Boolean;
              Syntax:          TSyntaxHighlighter;
              DocumentName:    String;
              ExplorerHeight:  Integer;
              ToolBar:         TMyToolbar;
            end;

(* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *)

var
  cfg:           TAppConfig;
Das funktioniert soweit auch ganz gut, allerdings kann ich nicht auf die Variable zugreifen. Da kommt dann immer ein Zugriffsfehler! warum kann ich eucht nicht sagen... daher hoffe ich, dass einer von euch mir da weiterhelfen kann!

chrisw 27. Apr 2005 14:15

Re: Probleme beim Zugriff auf Variable
 
Du suchst sicherlich record und nicht class ! Oder ?

jfheins 27. Apr 2005 14:15

Re: Probleme beim Zugriff auf Variable
 
Hast du die Klasse mit
Delphi-Quellcode:
MeineKlasse := TMyClass.Create;
erstellt ?

s.h.a.r.k 27. Apr 2005 14:17

Re: Probleme beim Zugriff auf Variable
 
is okey -.- danke! :wall: das tut ja fast weh!!! danke :zwinker:


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:47 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz