Autor Beitrag
csigg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Fr 20.05.05 13:02 
Sagt jemand von euch EOutOfResources Nicht genügend Timer verfügbar was???
Von as kann sowas kommen??
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Fr 20.05.05 13:04 
Du erstellst in einer Schleife oder Timer-Event immer wieder Objekte, ohne sie wieder freizugeben, würde ich jetzzt mal so raten ohne Sourcecode gesehen zu haben.
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Fr 20.05.05 13:09 
Ich kann dir die Source schon zeigen, sind aber ca 8000 Zeilen. Wie kann ich die Objekte wieder Freigeben??
Alstar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 827



BeitragVerfasst: Fr 20.05.05 13:11 
Klassen-Instanzen mit

ausblenden Delphi-Quelltext
1:
Klasse.Free;					


Alstar
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Fr 20.05.05 13:11 
EOutOfResources wird ausgelöst, wenn eine Anwendung versucht, ein Windows-Handle zu erzeugen, während Windows keine Handles mehr verfügbar hat.
So stehts im Internet, sagt mir aber auch nicht wirklih viel.
Alstar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 827



BeitragVerfasst: Fr 20.05.05 13:12 
Erstellst du in einem TTimer-Event Klassen-Instanzen?
Wenn ja, dinn gib sie mal irgendwann mit der o.g. Prozedur wieder Frei!

Alstar
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Fr 20.05.05 13:20 
TTimer-Event Klassen-Instanzen??? Wie erstell ich denn sowas, bei mir wird recht oft ein Timer.enabled := false;
Timer.enabled := true;
Aufgerufen, wie geb ich das jetzt frei??
Alstar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 827



BeitragVerfasst: Fr 20.05.05 13:28 
Nein. Ob du in dem TTimer-Event [ ] Klassen-Instanzen oder sowas erstellst.

Alstar
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Fr 20.05.05 13:30 
Sorry, kann die da jetzt leider nix sagen, hab nicht wirklich viel Plan von dem ganzen.
Wie erstelle ich denn ne Instanz??
Alstar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 827



BeitragVerfasst: Fr 20.05.05 13:31 
puh. Am besten postest du mal die TTimer-Events hier rein, dann könnten wir dir glaub ich besser helfen.

Alstar
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Fr 20.05.05 13:39 
Erstes OnTimer Event:
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:
30:
procedure Tfrm_Main.tmrResAktualTimer(Sender: TObject);
var zeit: TTime;
    Hour:    word;
    Min:     word;
    Sec:     word;
    Msec:    word;
begin
zeit := now;
DecodeTime(zeit, Hour, Min, Sec, MSec);
if (min mod 15) = 0 then
  prc_refresh;
end;

procedure Tfrm_Main.FormClose(Sender: TObject; var Action: TCloseAction);
begin
   with dmMesse do
   begin
    qryReservierung.Close;
    qryMitarbeiterAuswahl.Close;
    qrySpezialisten.Close;
    qrySprachen.close;
    qryBilder.close;
    qryParameter.close;
    qryRaum.close;

    //IBMessegdb.close;
    IBSQL1.Close;
   end;

end;

2.
ausblenden Delphi-Quelltext
1:
 mainZeit.Caption := FormatDateTime('dddd, dd.mmmm yyyy' +#13+ 'hh:nn:ss', now);					

3.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
   //während der Anzeige indragdrop gesetzt => keine Aktualisierungen => jetzt wieder möglich
    markierungaktiv:=false;
    edtMitarbeiterSuchen.Color := clwhite;
    shRahmen.Visible := false;

    tmrMarkloeschen.Enabled := false;
    {durch refresh wird das SubItem[2]='gefunden' zu ='leer' und damit
     die Markierung aus OnCustomDraw entfernt;}

    prc_refresh;

4.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
{SendMessage(self.Handle,WM_KEYDOWN,vk_f5,0); }

  dmMesse.DBDaySource1.Next;
  dmMesse.DBDaySource1.Prev;
  dmMesse.TReservierung.Active := true;
  tmrRefresh.Enabled := false;

 { dmMesse.DBDaySource1.Reload;
  dmMesse.DBDaySource1.Refresh;       }

5.
ausblenden Delphi-Quelltext
1:
 resZeit.Caption := FormatDateTime('dddd, dd.mmmm yyyy' +#13+ 'hh:nn:ss', now);					
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Fr 20.05.05 13:54 
Also soweit ich das überblicken kann müsste das OK sein, oder??
Oder liegt das evtl. an dem
ausblenden Delphi-Quelltext
1:
 dmMesse.TReservierung.Active := true;