Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:56 pm
by BeeJay >> Thu, 18 May 2006 3:50:46 GMT
Brendan - My ears were burning, so I thought I'd add my $0.02. BJ. {;-þ)
Actually, there is a way to get at thin client command line entries without resorting to any Windows API calls. Suppose the thin client shortcut has the following command line, with MyAdditionalParam at the end after the usual command line entries:
C:\Jade61\bin\jade.exe app=Test schema=Test AppServer=LocalHost AppServerPort=12345 ini=c:\Jade61\bin\jade.ini MyAdditionalParam=HereWeGo
You can then use Application::getProfileString to get information from the command line by way of the "JadeCommandLine" section using code as per the following sample code. Of course, if someone actually creates a JadeCommandLine section in the ini file in question and puts in a value for the MyAdditionalParam, then it could cause unwanted behaviour as Application::getProfileString will return this value when the command line does not contain a MyAdditionalParam entry: _________________________________________________________
<pre>
constants
NothingOnCommandLine = "Nothing Found On Command Line";
vars
additionalParam : String ;
begin
additionalParam := app.getProfileString( app.getIniFileName, "JadeCommandLine", "MyAdditionalParam", NothingOnCommandLine );
if additionalParam = NothingOnCommandLine then
app.debugLog( "Missing required MyAdditionalParam parameter on command line" );
terminate;
endif;
end;
</pre>
_________________________________________________________
I'm not sure if this was the intended behaviour of the app.getProfileString method, but it is certainly a nice behaviour and hopefully one that will work in a Linux environment - unfortunately I don't have a Linux environment available to test this out. Perhaps someone who has access to a Linux environment would like to test this with a Linux PG client and advise their results back to the Newsgroups?
Cheers,
BeeJay.