Mark Morgan Lloyd <[email protected]> hat am 5. Juni 2012 um 11:57 geschrieben:
>[...] > Please can I tack a related question onto this. If I have analogous > forms in a main program and shared library (.dll or .so), where the menu > structure in the main form is built up from what's in the library, can > the main program's menu call OnClick() events in the library safely? > > What I'm hoping to do is use the library's form(s) purely for design > purposes, i.e. they're never displayed but instead their menu structure > is copied to the main program. Non-graphical backend functionality would > be in the library, and I've obviously got the choice of attempting to > control this using OnClick() etc. or by passing commands in strings to > be parsed. An event is just a method pointer (instance+address). So you can connect even a C library if the method signature fits. Of course not via the designer, but by code. So, yes you can call pascal functions in libs. But you have to be careful with all shared things that uses compiler magic like classes, strings, interfaces, global variables. See http://wiki.freepascal.org/packages Mattias
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
