Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi Delphi mag Antifreeze nicht (https://www.delphipraxis.net/69877-delphi-mag-antifreeze-nicht.html)

citybreaker 21. Mai 2006 17:35


Delphi mag Antifreeze nicht
 
Hallo!

Habe ein Problem. Ich haben ein idAntiFreeze auf meiner Form, wenn
ich die die Application starte, wird ein Fehler angezeigt, dass jeweils
nur ein AntiFreeze in jeder Application sein darf.

Woran kann das liegen? Hab nur einen im Projekt.

Bernhard Geyer 21. Mai 2006 20:07

Re: Delphi mag Antifreeze nicht
 
Stelle einen Breakpoint auf den Konstruktor der Komponente und schau dir den Aufrufstack an um zu sehen wo noch eine Instanz erzeugt wird.

citybreaker 22. Mai 2006 14:45

Re: Delphi mag Antifreeze nicht
 
Wie funktioniert das?

Bernhard Geyer 22. Mai 2006 20:14

Re: Delphi mag Antifreeze nicht
 
Zitat:

Zitat von citybreaker
Wie funktioniert das?

Einen Breakpoint zu setzen oder den Aufrufstack anzuschauen?

Breakpoint: Einfach im Quellcode auf den linken grauen Bereich in der gewünschten Zeile klicken so das die Quellzeile rot markiert wird.

Aufrufstack: Wenn Programm an Breakpoint stoppt. Menu "Ansicht/Debug-Fenster/Aufruf-Stack"

torud 23. Mai 2006 18:19

Re: Delphi mag Antifreeze nicht
 
Ich habe vorhin zufällig in der Indy-Hilfe gelesen, dass man nur EIN AntiFreeze pro Form und Application verwenden darf, da ansonsten eine Exception ausgelöst wird.

BTW. Ich habe nicht ganz verstanden wozu diese Komponente da ist...

Klaus01 23. Mai 2006 18:29

Re: Delphi mag Antifreeze nicht
 
Aus der Hilfe:

Zitat:

Prevents an application UI from freezing.

TIdAntiFreeze = class(TIdAntiFreezeBase)

Description

Indy works on the blocking model. That is when calls are made to Indy the do not return until they are complete. If calls are made in the main thread this will cause the Application User Interface to "freeze" during Indy calls. TIdAntiFreeze counter acts this effect. TIdAntiFreeze allows Indy subsystem to make Application.ProcessMessage calls so that Windows messages continue to be executed while Indy calls are in process.

Only one TIdAntiFreeze can be active in an application. If another instance already exists, an exception is raised. TIdAntiFreezeBase uses the global variable GAntiFreeze, declared in the TIdAntiFreezeBase unit, to determine if another instance has already been created.

Note: GAntiFreeze is not assigned if an instance is added in the form designer (during design time).

Note: The TIdAntiFreeze.pas unit must NOT appear in the uses clause of any Indy or descendant unit. This unit is linked in an application when the component is placed on a Form. This is done to preserve isolation from the FORMS.PAS and QForms.pas units.

Grüße
Klaus


Alle Zeitangaben in WEZ +1. Es ist jetzt 09:51 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