AGB  ·  Datenschutz  ·  Impressum  







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

Viele Formulare in einem Projekt

Ein Thema von dr. jack1 · begonnen am 5. Okt 2013 · letzter Beitrag vom 10. Nov 2013
 
Furtbichler
(Gast)

n/a Beiträge
 
#21

AW: Viele Formulare in einem Projekt

  Alt 9. Nov 2013, 19:17
Delphi ist ein RAD-Tool (eigentlich: DAS RAD-Tool). RAD bedeutet in erster Linie 'Rapid'. Und da ist es logisch, das in diesem Kontext die Formulare sofort zur Verfügung stehen. Das könnte man auch mit Lazy-Load umsetzen, aber historisch hat Borcardero das nun mal anders gelöst. Schade eigentlich, aber egal.

Schön wäre so ein Pattern beim Erzeugen eines neuen Formulars: Statt
Delphi-Quellcode:
Unit MyForm;
interface
uses...
Type
  TMyForm...

Var
  MyForm : TMyForm;
...
// in der DPR
Application.CreateForm(MyForm, TMyForm);
einfach so (Lazy Load):

Delphi-Quellcode:
Unit MyForm;
interface
uses...
Type
  TMyForm...

Function MyForm : TMyForm;
implementation
Var
  _myForm : TMyForm:

Function MyForm : TMyForm;
begin
  if _myForm=Nil then Application.CreateForm(_myForm, TMForm);
  result := _myForm
End;
  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 10:57 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