Hello again :-) I've included a TTimer in main form. It shows a message at start and every interval it changes a label (alternatively 1/2). I can see that it continues running (changing 1 to 2 and 2 to 1) ever if dll form is shown both in Mac and Win.
Juan. 2011/8/15 Michael Schnell <[email protected]> > On 08/15/2011 02:21 PM, Juan Sánchez wrote: > >> . I've discovered a simple method that seems to run ok on both Win and >> Mac. >> > You don't create the application instance but you initialize it. > > Seemingly this does not harm the Application instance of the main > executable. So it seems like the DLL automatically instantiates it's own > independent Application instance (and has its own "Application" variable to > manage same). > > This in fact is possible. You might want to verify this by printing both > the Application pointers via IntToHex(integer(Application))**, 8) ) and > verify that they are different. > > As you don't use a thread, I suppose Application.Initialize in the DLL > re-attaches the GUI framework to the main thread. I suppose this will freeze > or destroy the GUI of the main program. This might or might not be > desirable. I think it is not desirable, as e.g. TTimers are handled via the > GUI binding. > > You might want to check if the GUI and/or the TTimers of the main program > are still workable wile/after the DLL's GUI is displayed. > > -Michael > > > > > > -- > ______________________________**_________________ > Lazarus mailing list > [email protected].**freepascal.org<[email protected]> > http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarus<http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus> >
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
