Einzelnen Beitrag anzeigen

Benutzerbild von igel457
igel457

Registriert seit: 31. Aug 2005
1.622 Beiträge
 
FreePascal / Lazarus
 
#11

Re: Feststellen ob Anwendung die VCL verwendet

  Alt 1. Jun 2010, 21:21
Zitat von himitsu:
Eine zündene Idee, wie der Anwender doch mithilft.
PS: Nur weil die VCL eingebunden ist, muß sie bei den Events dennoch keine Rolle spielen.

Bau doch einfach ein Feld/Property in deiner Komponente ein, wo man den SyncMode wählen kann.
(per Standard auf VCL-Synchronize ... sicher ist sicher, falls man das Setzen vergist)
Habe ich (mehr oder weniger)... Ist zwar keine Komponente, aber man kann einfach mittels folgender Funktionen...
Delphi-Quellcode:
{Allows you to set an own instance of a notification processor. This method has to be called before any other notification system procedure has been used.
@seealso(TAcNotifyProcessor)}

procedure AcNotifyManualSetProcessor(ANotifyProcessor: TAcNotifyProcessor);
{If you've initialized the notification queue system using the AcNotifyManualInit function, you must use this function to synchronize the notifications with the thread calling AcNotifyManualProcessQueue.
@seealso(AcNotifyManualInit)}

procedure AcNotifyManualProcessQueue;
{Initializes the notification system with TAcManualNotifyProcessor, allowing you to use the AcNotifyManualProcessQueue function.
@seealso(AcNotifyManualProcessQueue)}

procedure AcNotifyManualInit;
...beim Programmstart einen eigenen Prozessor für die Events festlegen oder auf den oben beschriebenen manuellen Modus umschalten. Macht man gar nichts wird bei der ersten Verwendung der Notify-Funktionalität der Standard ausgewählt. Entweder der TAcVCLNotifyProzessor oder eben der TAcNonVCLNotifyProcessor.

Ich möchte eben nur irgendwie automatisch den Standardprozessor setzen...
Andreas
"Sollen sich auch alle schämen, die gedankenlos sich der Wunder der Wissenschaft und Technik bedienen, und nicht mehr davon geistig erfasst haben als die Kuh von der Botanik der Pflanzen, die sie mit Wohlbehagen frisst." - Albert Einstein
  Mit Zitat antworten Zitat