<br><br><div class="gmail_quote">On 13 March 2011 08:43, Sven Barth <span dir="ltr"><<a href="mailto:pascaldragon@googlemail.com">pascaldragon@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Am 13.03.2011 00:22, schrieb Frank Church:<div class="im"><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I am using 0.9.28,3 with FPC 2,4,0 on Window.<br>
<br>
I further reduced it to this<br>
<br>
program Demo_LoadPersistenceLayerIfDef_Laz;<br>
<br>
{$mode objfpc}{$H+}<br>
<br>
uses<br>
{$IFDEF UNIX}{$IFDEF UseCThreads}<br>
cthreads,<br>
{$ENDIF}{$ENDIF}<br>
Interfaces, // this includes the LCL widgetset<br>
Forms, //frmMain,<br>
//LResources,<br>
<br>
DemoDBUtils in '..\Common\DemoDBUtils.pas';<br>
<br>
{$IFDEF WINDOWS}{$R Demo_LoadPersistenceLayerIfDef_Laz.rc}{$ENDIF}<br>
</blockquote>
<br></div>
You can disable this one, too.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
begin<br>
//{$I Demo_LoadPersistenceLayerIfDef_Laz.lrs}<br>
Application.Initialize;<br>
//Application.CreateForm(TForm1, Form1);<br>
//Application.Run;<br>
ShowConnectedDatabases;<br>
end.<br>
<br>
<br>
Thanks for your response.<br>
<br>
And it looks like Application requires Interfaces and Forms, and from<br>
what you describe the ShowConnectedDatabases is probably only working at<br>
the end of the program's execution.<br>
</blockquote>
<br></div>
As you've disabled the "Application.Run" call it will work immediatly (if at all), because the potentially endless main loop is not started.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Is it possible that a GUI app will<br>
work without TApplication on Windows, or at the least one that requires<br>
only the dialog?<br>
</blockquote>
<br></div>
You can try to disable the "Application.Initialize" call as well to see what happens, but I can't tell what the Win32 LCL needs to show a simple dialog...<br>
<br>
Note: If you can successfully remove this call, you can remove the usage of unit "Forms" as well. The unit "Interfaces" must be kept though and if you don't need threads (on non-Windows) you can remove the part containing "cthreads" as well.<br>
<br></blockquote><div><br>Application.Initialize is necessary in this case. The dialog does not come up unless it is executed.<br><br>I will try it in 0.9.31 and FPC 2.5.1 on both Windows and Win32 to find out.<br><br><br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Regards,<br>
Sven<br><font color="#888888">
<br>
--<br>
_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org" target="_blank">Lazarus@lists.lazarus.freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Frank Church<br><br>=======================<br><a href="http://devblog.brahmancreations.com">http://devblog.brahmancreations.com</a><br>