TvPlanIt: Fix writable data file location of DayViewWrapStyleDemo for cocoa.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8895 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2023-07-22 15:03:31 +00:00
parent 9f444a7a30
commit ad1cd546a6
4 changed files with 35 additions and 30 deletions

View File

@ -4,8 +4,11 @@
<Version Value="12"/> <Version Value="12"/>
<PathDelim Value="\"/> <PathDelim Value="\"/>
<General> <General>
<Flags>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
<Title Value="project1"/> <Title Value="dayview_wrapstyle_demo"/>
<Scaled Value="True"/> <Scaled Value="True"/>
<ResourceType Value="res"/> <ResourceType Value="res"/>
<UseXPManifest Value="True"/> <UseXPManifest Value="True"/>
@ -14,8 +17,8 @@
</XPManifest> </XPManifest>
<Icon Value="0"/> <Icon Value="0"/>
</General> </General>
<BuildModes> <BuildModes Count="1">
<Item Name="Default" Default="True"/> <Item1 Name="Default" Default="True"/>
</BuildModes> </BuildModes>
<PublishOptions> <PublishOptions>
<Version Value="2"/> <Version Value="2"/>
@ -24,37 +27,38 @@
<RunParams> <RunParams>
<FormatVersion Value="2"/> <FormatVersion Value="2"/>
</RunParams> </RunParams>
<RequiredPackages> <RequiredPackages Count="3">
<Item> <Item1>
<PackageName Value="laz_visualplanit_design"/> <PackageName Value="laz_visualplanit_design"/>
</Item> </Item1>
<Item> <Item2>
<PackageName Value="laz_visualplanit"/> <PackageName Value="laz_visualplanit"/>
</Item> </Item2>
<Item> <Item3>
<PackageName Value="LCL"/> <PackageName Value="LCL"/>
</Item> </Item3>
</RequiredPackages> </RequiredPackages>
<Units> <Units Count="2">
<Unit> <Unit0>
<Filename Value="project1.lpr"/> <Filename Value="dayview_wrapstyle_demo.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
</Unit> <UnitName Value="DayView_WrapStyle_Demo"/>
<Unit> </Unit0>
<Filename Value="unit1.pas"/> <Unit1>
<Filename Value="dvwsmain.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/> <ComponentName Value="Form1"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/> <UnitName Value="dvwsMain"/>
</Unit> </Unit1>
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="11"/> <Version Value="11"/>
<PathDelim Value="\"/> <PathDelim Value="\"/>
<Target> <Target>
<Filename Value="project1"/> <Filename Value="dayview_wrapstyle_demo"/>
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/> <IncludeFiles Value="$(ProjOutDir)"/>
@ -72,16 +76,16 @@
</Linking> </Linking>
</CompilerOptions> </CompilerOptions>
<Debugging> <Debugging>
<Exceptions> <Exceptions Count="3">
<Item> <Item1>
<Name Value="EAbort"/> <Name Value="EAbort"/>
</Item> </Item1>
<Item> <Item2>
<Name Value="ECodetoolError"/> <Name Value="ECodetoolError"/>
</Item> </Item2>
<Item> <Item3>
<Name Value="EFOpenError"/> <Name Value="EFOpenError"/>
</Item> </Item3>
</Exceptions> </Exceptions>
</Debugging> </Debugging>
</CONFIG> </CONFIG>

View File

@ -1,4 +1,4 @@
program project1; program DayView_WrapStyle_Demo;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
@ -10,14 +10,13 @@ uses
athreads, athreads,
{$ENDIF} {$ENDIF}
Interfaces, // this includes the LCL widgetset Interfaces, // this includes the LCL widgetset
Forms, unit1 Forms, dvwsMain
{ you can add units after this }; { you can add units after this };
{$R *.res} {$R *.res}
begin begin
RequireDerivedFormResource:=True; RequireDerivedFormResource:=True;
Application.Title:='project1';
Application.Scaled:=True; Application.Scaled:=True;
Application.Initialize; Application.Initialize;
Application.CreateForm(TForm1, Form1); Application.CreateForm(TForm1, Form1);

View File

@ -1,4 +1,4 @@
unit Unit1; unit dvwsMain;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
@ -47,6 +47,8 @@ procedure TForm1.FormCreate(Sender: TObject);
var var
d: TDate; d: TDate;
begin begin
VpIniDataStore1.FileName := GetAppConfigDir(false) + 'data.ini';
if VpIniDatastore1.Resources.Count = 0 then if VpIniDatastore1.Resources.Count = 0 then
VpDayView1.CheckCreateResource; VpDayView1.CheckCreateResource;
if VpIniDatastore1.Resources.Count > 0 then if VpIniDatastore1.Resources.Count > 0 then