[lazarus] Patch for win32 : ShowModal and Lazconf

Karl Brandt pascalive at bol.com.br
Wed Sep 10 18:19:48 EDT 2003


Mattias Gaertner wrote:
> On Tue, 09 Sep 2003 21:11:10 -0300
> Karl Brandt <pascalive at bol.com.br> wrote:
> 
> 
>>Mattias Gaertner wrote:
>>
>>>On Tue, 09 Sep 2003 00:56:44 -0300
>>>Karl Brandt <pascalive at bol.com.br> wrote:
>>>
>>>>BTW: When Creating config files, if Primary file is not found, is tried 
>>>>to copy from secondary file to primary file. This creates a exception 
>>>>because primary file also not exists. Maybe can be checked if primary 
>>>>file exists and if no, created a default one.
>>
>>Sorry,i mean secondary config file.
>>
>>
>>>There is an try..except around the copy. And defaults are always
>>>created.
>>
>>At least in my system, this default secondary config is not saved to disk.
> 
> 
> The secondary config file is for templates. For example admins can setup
> some default values for all users.

So, the user must copy/make a config secondary file manually?

The sequence i had in mind was:

Check if secondary exits
if no, create one and save to disk
Check if primary exists
if no, copy from secondary to primary

This way in first run both files will be automatically generated and if 
desired, the user can change/edit the secondary/template file.

But look that this is not the desired behavior


> Can you tell me, where the exception is raised?
>

Inside CopySecondaryConfigFile function(lazconf.inc)
at SrcFS:=TFileStream.Create(SecondaryFilename,fmOpenRead);

karl






More information about the Lazarus mailing list