From d26c738b034aca840ee6f510a6dc022821e6458d Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Fri, 10 Jul 2020 18:11:22 +0000 Subject: [PATCH] jvcllaz: Check and fix compilation and examples for Laz 2.0.10/FPC 3.2.0 git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7536 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../JvBehaviorLabel/JvBehaviorLabelDemo.lpi | 18 +-- .../JvImageTransform/JvImageTransformDemo.lpi | 41 +++--- .../JvInterpreterCallFunction.lpi | 45 ++++--- .../JvInterpreterCallFunctionFm.lfm | 125 +----------------- .../JvInterpreterCallFunctionFm.pas | 88 +++++++++--- .../JvInterpreterSimpleExpression.lpi | 45 ++++--- .../JvInterpreterSimpleExpression.lpr | 2 +- .../JvNavigationPane/JvNavPaneDemo.lpi | 12 +- .../jvcllaz/examples/JvPanel/JvPanelDemo.lpi | 18 +-- .../jvcllaz/examples/JvPicClip/main.lfm | 2 +- .../jvcllaz/examples/JvPicClip/main.pas | 34 ++--- .../JvSpecialImage/JvSpecialImageDemo.lpi | 41 +++--- components/jvcllaz/run/JvMM/jvpicclip.pas | 1 - .../run/JvPascalInterpreter/JvInterpreter.pas | 4 +- .../JvPascalInterpreter/JvInterpreterFm.pas | 10 +- 15 files changed, 218 insertions(+), 268 deletions(-) diff --git a/components/jvcllaz/examples/JvBehaviorLabel/JvBehaviorLabelDemo.lpi b/components/jvcllaz/examples/JvBehaviorLabel/JvBehaviorLabelDemo.lpi index f042cd9fd..c62d356dd 100644 --- a/components/jvcllaz/examples/JvBehaviorLabel/JvBehaviorLabelDemo.lpi +++ b/components/jvcllaz/examples/JvBehaviorLabel/JvBehaviorLabelDemo.lpi @@ -4,6 +4,9 @@ + + + <Scaled Value="True"/> @@ -14,8 +17,8 @@ </XPManifest> <Icon Value="0"/> </General> - <BuildModes> - <Item Name="Default" Default="True"/> + <BuildModes Count="1"> + <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> @@ -23,7 +26,6 @@ </PublishOptions> <RunParams> <FormatVersion Value="2"/> - <Modes Count="0"/> </RunParams> <RequiredPackages Count="2"> <Item1> @@ -33,18 +35,18 @@ <PackageName Value="LCL"/> </Item2> </RequiredPackages> - <Units> - <Unit> + <Units Count="2"> + <Unit0> <Filename Value="JvBehaviorLabelDemo.lpr"/> <IsPartOfProject Value="True"/> - </Unit> - <Unit> + </Unit0> + <Unit1> <Filename Value="JvBehaviorLblMainFrmU.pas"/> <IsPartOfProject Value="True"/> <ComponentName Value="JvBehaviorLblMainFrm"/> <HasResources Value="True"/> <ResourceBaseClass Value="Form"/> - </Unit> + </Unit1> </Units> </ProjectOptions> <CompilerOptions> diff --git a/components/jvcllaz/examples/JvImageTransform/JvImageTransformDemo.lpi b/components/jvcllaz/examples/JvImageTransform/JvImageTransformDemo.lpi index 9acc5315d..669e4e278 100644 --- a/components/jvcllaz/examples/JvImageTransform/JvImageTransformDemo.lpi +++ b/components/jvcllaz/examples/JvImageTransform/JvImageTransformDemo.lpi @@ -4,6 +4,9 @@ <Version Value="12"/> <PathDelim Value="\"/> <General> + <Flags> + <CompatibilityMode Value="True"/> + </Flags> <SessionStorage Value="InProjectDir"/> <Title Value="JvImageTransformDemo"/> <Scaled Value="True"/> @@ -14,8 +17,8 @@ </XPManifest> <Icon Value="0"/> </General> - <BuildModes> - <Item Name="Default" Default="True"/> + <BuildModes Count="1"> + <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> @@ -24,27 +27,27 @@ <RunParams> <FormatVersion Value="2"/> </RunParams> - <RequiredPackages> - <Item> + <RequiredPackages Count="2"> + <Item1> <PackageName Value="JvMMLazR"/> - </Item> - <Item> + </Item1> + <Item2> <PackageName Value="LCL"/> - </Item> + </Item2> </RequiredPackages> - <Units> - <Unit> + <Units Count="2"> + <Unit0> <Filename Value="JvImageTransformDemo.lpr"/> <IsPartOfProject Value="True"/> - </Unit> - <Unit> + </Unit0> + <Unit1> <Filename Value="jvimagetransformform.pas"/> <IsPartOfProject Value="True"/> <ComponentName Value="MainForm"/> <HasResources Value="True"/> <ResourceBaseClass Value="Form"/> <UnitName Value="JvImageTransformForm"/> - </Unit> + </Unit1> </Units> </ProjectOptions> <CompilerOptions> @@ -66,16 +69,16 @@ </Linking> </CompilerOptions> <Debugging> - <Exceptions> - <Item> + <Exceptions Count="3"> + <Item1> <Name Value="EAbort"/> - </Item> - <Item> + </Item1> + <Item2> <Name Value="ECodetoolError"/> - </Item> - <Item> + </Item2> + <Item3> <Name Value="EFOpenError"/> - </Item> + </Item3> </Exceptions> </Debugging> </CONFIG> diff --git a/components/jvcllaz/examples/JvInterpreterDemos/JvInterpreterCallFunction/JvInterpreterCallFunction.lpi b/components/jvcllaz/examples/JvInterpreterDemos/JvInterpreterCallFunction/JvInterpreterCallFunction.lpi index b83e05098..a51be1bb4 100644 --- a/components/jvcllaz/examples/JvInterpreterDemos/JvInterpreterCallFunction/JvInterpreterCallFunction.lpi +++ b/components/jvcllaz/examples/JvInterpreterDemos/JvInterpreterCallFunction/JvInterpreterCallFunction.lpi @@ -4,6 +4,9 @@ <Version Value="12"/> <PathDelim Value="\"/> <General> + <Flags> + <CompatibilityMode Value="True"/> + </Flags> <SessionStorage Value="InProjectDir"/> <Title Value="JvInterpreterCallFunction"/> <Scaled Value="True"/> @@ -14,8 +17,8 @@ </XPManifest> <Icon Value="0"/> </General> - <BuildModes> - <Item Name="Default" Default="True"/> + <BuildModes Count="1"> + <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> @@ -24,29 +27,29 @@ <RunParams> <FormatVersion Value="2"/> </RunParams> - <RequiredPackages> - <Item> + <RequiredPackages Count="3"> + <Item1> <PackageName Value="SynEdit"/> - </Item> - <Item> + </Item1> + <Item2> <PackageName Value="JvPascalInterpreterR"/> - </Item> - <Item> + </Item2> + <Item3> <PackageName Value="LCL"/> - </Item> + </Item3> </RequiredPackages> - <Units> - <Unit> + <Units Count="2"> + <Unit0> <Filename Value="JvInterpreterCallFunction.lpr"/> <IsPartOfProject Value="True"/> - </Unit> - <Unit> + </Unit0> + <Unit1> <Filename Value="JvInterpreterCallFunctionFm.pas"/> <IsPartOfProject Value="True"/> <ComponentName Value="Form1"/> <HasResources Value="True"/> <ResourceBaseClass Value="Form"/> - </Unit> + </Unit1> </Units> </ProjectOptions> <CompilerOptions> @@ -68,16 +71,16 @@ </Linking> </CompilerOptions> <Debugging> - <Exceptions> - <Item> + <Exceptions Count="3"> + <Item1> <Name Value="EAbort"/> - </Item> - <Item> + </Item1> + <Item2> <Name Value="ECodetoolError"/> - </Item> - <Item> + </Item2> + <Item3> <Name Value="EFOpenError"/> - </Item> + </Item3> </Exceptions> </Debugging> </CONFIG> diff --git a/components/jvcllaz/examples/JvInterpreterDemos/JvInterpreterCallFunction/JvInterpreterCallFunctionFm.lfm b/components/jvcllaz/examples/JvInterpreterDemos/JvInterpreterCallFunction/JvInterpreterCallFunctionFm.lfm index 27e54eb82..f01b7160b 100644 --- a/components/jvcllaz/examples/JvInterpreterDemos/JvInterpreterCallFunction/JvInterpreterCallFunctionFm.lfm +++ b/components/jvcllaz/examples/JvInterpreterDemos/JvInterpreterCallFunction/JvInterpreterCallFunctionFm.lfm @@ -1,13 +1,14 @@ object Form1: TForm1 - Left = 450 + Left = 369 Height = 690 - Top = 165 + Top = 140 Width = 965 - Caption = 'Form1' + Caption = 'JvInterpreter Call Function Demo' ClientHeight = 690 ClientWidth = 965 Color = clBtnFace Font.Color = clWindowText + OnCreate = FormCreate OnShow = FormShow LCLVersion = '2.1.0.0' object Label1: TLabel @@ -23,117 +24,6 @@ object Form1: TForm1 Caption = 'Result:' ParentColor = False end - inline JvHLEditor1: TSynEdit - AnchorSideLeft.Control = Owner - AnchorSideTop.Control = Button2 - AnchorSideTop.Side = asrBottom - AnchorSideRight.Control = Owner - AnchorSideRight.Side = asrBottom - AnchorSideBottom.Control = Owner - AnchorSideBottom.Side = asrBottom - Left = 12 - Height = 637 - Top = 41 - Width = 941 - BorderSpacing.Left = 12 - BorderSpacing.Top = 8 - BorderSpacing.Right = 12 - BorderSpacing.Bottom = 12 - Anchors = [akTop, akLeft, akRight, akBottom] - Font.Height = -13 - Font.Name = 'Courier New' - Font.Pitch = fpFixed - Font.Quality = fqCleartype - ParentColor = False - ParentFont = False - TabOrder = 0 - Gutter.Width = 57 - Gutter.MouseActions = <> - RightGutter.Width = 0 - RightGutter.MouseActions = <> - Highlighter = SynPasSyn1 - Keystrokes = <> - MouseActions = <> - MouseTextActions = <> - MouseSelActions = <> - Lines.Strings = ( - 'unit UserFunctions;' - '' - '// sample of a user-created-library of jvinterpreter functions that your compiled' - '// program might access:' - '' - '' - '// notice that there is no interface/implementation section in this ' - '// interpreter-only unit.' - '' - 'function MyFunction(B:String):Integer;' - 'begin' - ' result := Length(B);' - 'end;' - '' - 'function MyFunction2(A,B:Integer):Integer;' - 'begin' - ' result := A+B;' - 'end;' - '' - '' - 'end.' - ) - VisibleSpecialChars = [vscSpace, vscTabAtLast] - SelectedColor.BackPriority = 50 - SelectedColor.ForePriority = 50 - SelectedColor.FramePriority = 50 - SelectedColor.BoldPriority = 50 - SelectedColor.ItalicPriority = 50 - SelectedColor.UnderlinePriority = 50 - SelectedColor.StrikeOutPriority = 50 - BracketHighlightStyle = sbhsBoth - BracketMatchColor.Background = clNone - BracketMatchColor.Foreground = clNone - BracketMatchColor.Style = [fsBold] - FoldedCodeColor.Background = clNone - FoldedCodeColor.Foreground = clGray - FoldedCodeColor.FrameColor = clGray - MouseLinkColor.Background = clNone - MouseLinkColor.Foreground = clBlue - LineHighlightColor.Background = clNone - LineHighlightColor.Foreground = clNone - inline SynLeftGutterPartList1: TSynGutterPartList - object SynGutterMarks1: TSynGutterMarks - Width = 24 - MouseActions = <> - end - object SynGutterLineNumber1: TSynGutterLineNumber - Width = 17 - MouseActions = <> - MarkupInfo.Background = clBtnFace - MarkupInfo.Foreground = clNone - DigitCount = 2 - ShowOnlyLineNumbersMultiplesOf = 1 - ZeroStart = False - LeadingZeros = False - end - object SynGutterChanges1: TSynGutterChanges - Width = 4 - MouseActions = <> - ModifiedColor = 59900 - SavedColor = clGreen - end - object SynGutterSeparator1: TSynGutterSeparator - Width = 2 - MouseActions = <> - MarkupInfo.Background = clWhite - MarkupInfo.Foreground = clGray - end - object SynGutterCodeFolding1: TSynGutterCodeFolding - MouseActions = <> - MarkupInfo.Background = clNone - MarkupInfo.Foreground = clGray - MouseActionsExpanded = <> - MouseActionsCollapsed = <> - end - end - end object Button1: TButton AnchorSideLeft.Control = Owner AnchorSideTop.Control = Owner @@ -146,7 +36,7 @@ object Form1: TForm1 BorderSpacing.Top = 8 Caption = 'Call MyFunction' OnClick = Button1Click - TabOrder = 1 + TabOrder = 0 end object Button2: TButton AnchorSideLeft.Control = Button1 @@ -160,7 +50,7 @@ object Form1: TForm1 BorderSpacing.Left = 12 Caption = 'Call MyFunction2' OnClick = Button2Click - TabOrder = 2 + TabOrder = 1 end object Edit1: TEdit AnchorSideLeft.Control = Label1 @@ -173,7 +63,7 @@ object Form1: TForm1 Width = 121 BorderSpacing.Left = 12 ReadOnly = True - TabOrder = 3 + TabOrder = 2 end object JvInterpreterProgram1: TJvInterpreterProgram OnGetValue = JvInterpreterProgram1GetValue @@ -185,7 +75,6 @@ object Form1: TForm1 CommentAttri.Foreground = clTeal CompilerMode = pcmDelphi NestedComments = False - TypeHelpers = True left = 325 top = 272 end diff --git a/components/jvcllaz/examples/JvInterpreterDemos/JvInterpreterCallFunction/JvInterpreterCallFunctionFm.pas b/components/jvcllaz/examples/JvInterpreterDemos/JvInterpreterCallFunction/JvInterpreterCallFunctionFm.pas index 1907631c4..a89b05a4f 100644 --- a/components/jvcllaz/examples/JvInterpreterDemos/JvInterpreterCallFunction/JvInterpreterCallFunctionFm.pas +++ b/components/jvcllaz/examples/JvInterpreterDemos/JvInterpreterCallFunction/JvInterpreterCallFunctionFm.pas @@ -3,17 +3,15 @@ unit JvInterpreterCallFunctionFm; interface uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - StdCtrls, Dialogs, SynEdit, SynHighlighterPas, //JvComponentBase, - JvInterpreter, JvExControls; -// JvEditorCommon, JvEditor, JvHLEditor; + SysUtils, Variants, Classes, Graphics, Controls, Forms, + StdCtrls, Dialogs, SynEdit, SynHighlighterPas, LCLVersion, + JvInterpreter; type { TForm1 } TForm1 = class(TForm) - JvHLEditor1: TSynEdit; //JvHLEditor; Button1: TButton; Button2: TButton; Edit1: TEdit; @@ -21,6 +19,7 @@ type JvInterpreterProgram1: TJvInterpreterProgram; SynPasSyn1: TSynPasSyn; procedure Button1Click(Sender: TObject); + procedure FormCreate(Sender: TObject); procedure FormShow(Sender: TObject); procedure JvInterpreterProgram1GetValue(Sender: TObject; Identifier: String; var Value: Variant; Args: TJvInterpreterArgs; @@ -28,6 +27,7 @@ type procedure Button2Click(Sender: TObject); private { Private declarations } + JvHLEditor: TSynEdit; public { Public declarations } end; @@ -41,7 +41,7 @@ implementation procedure TForm1.Button1Click(Sender: TObject); var - Args:TJvInterpreterArgs; + Args: TJvInterpreterArgs; begin { before we get here, JvInterpreterProgram1.Pas is already set to show the text in the HLEditor. } Assert(JvInterpreterProgram1.Pas.Count>0); @@ -65,39 +65,85 @@ end; procedure TForm1.FormShow(Sender: TObject); begin { move program text over to interpreter! } - JvInterpreterProgram1.Pas.Assign( JvHLEditor1.Lines ); + JvInterpreterProgram1.Pas.Assign(JvHLEditor.Lines); end; procedure TForm1.JvInterpreterProgram1GetValue(Sender: TObject; Identifier: String; var Value: Variant; Args: TJvInterpreterArgs; var Done: Boolean); begin - Identifier := UpperCase(Identifier); + Identifier := UpperCase(Identifier); - if (Identifier='LENGTH') and (ARgs.Count=1) and (VarIsStr(Args.Values[0])) then - begin - Value := Length(ARgs.Values[0]); - Done := true; - end; + if (Identifier='LENGTH') and (ARgs.Count=1) and (VarIsStr(Args.Values[0])) then + begin + Value := Length(ARgs.Values[0]); + Done := true; + end; end; procedure TForm1.Button2Click(Sender: TObject); var - Param1,Param2,Param3:Variant; + Param1,Param2:Variant; begin { before we get here, JvInterpreterProgram1.Pas is already set to show the text in the HLEditor. } Assert(JvInterpreterProgram1.Pas.Count>0); - { Alternative method without creating/freeing JvInterpreter args is to use Params instead, but not Args:} + { Alternative method without creating/freeing JvInterpreter args is to use Params instead, but not Args:} + Param1 := 10; + Param2 := 20; + JvInterpreterProgram1.CallFunction( 'MyFunction2', nil, [Param1,Param2] ); - Param1 := 10; - Param2 := 20; - JvInterpreterProgram1.CallFunction( 'MyFunction2', nil, [Param1,Param2] ); - - - { show result to user:} + { show result to user:} Edit1.Text := VarToStr( JvInterpreterProgram1.VResult ); end; +procedure TForm1.FormCreate(Sender: TObject); +begin + JvHLEditor := TSynEdit.Create(self); + with JvHLEditor do + begin + Parent := self; + AnchorSideLeft.Control := self; + AnchorSideTop.Control := Button2; + AnchorSideTop.Side := asrBottom; + AnchorSideRight.Control := self; + AnchorSideRight.Side := asrBottom; + AnchorSideBottom.Control := Self; + AnchorSideBottom.Side := asrBottom; + BorderSpacing.Left := 12; + BorderSpacing.Top := 8; + BorderSpacing.Right := 12; + BorderSpacing.Bottom := 12; + Anchors := [akTop, akLeft, akRight, akBottom]; + Lines.Add('unit UserFunctions;'); + Lines.Add(''); + Lines.Add('// sample of a user-created-library of jvinterpreter functions that your compiled'); + Lines.Add('// program might access:'); + Lines.Add(''); + Lines.Add(''); + Lines.Add('// notice that there is no interface/implementation section in this '); + Lines.Add('// interpreter-only unit.'); + Lines.Add(''); + Lines.Add('function MyFunction(B:String):Integer;'); + Lines.Add('begin'); + Lines.Add(' result := Length(B);'); + Lines.Add('end;'); + Lines.Add(''); + Lines.Add('function MyFunction2(A,B:Integer):Integer;'); + Lines.Add('begin'); + Lines.Add(' result := A+B;'); + Lines.Add('end;'); + Lines.Add(''); + Lines.Add(''); + Lines.Add('end.'); + Highlighter := SynPasSyn1; + end; + {$IF LCL_FullVersion >= 2010000} + JvHLEditor.ScrollOnEditLeftOptions.ScrollExtraMax := 10; + JvHLEditor.ScrollOnEditLeftOptions.ScrollExtraPercent := 20; + SynPasSyn1.Typehelpers := true; + {$ENDIF} +end; + end. diff --git a/components/jvcllaz/examples/JvInterpreterDemos/JvInterpreterSimple/JvInterpreterSimpleExpression.lpi b/components/jvcllaz/examples/JvInterpreterDemos/JvInterpreterSimple/JvInterpreterSimpleExpression.lpi index 49662bb13..5a0a70cb6 100644 --- a/components/jvcllaz/examples/JvInterpreterDemos/JvInterpreterSimple/JvInterpreterSimpleExpression.lpi +++ b/components/jvcllaz/examples/JvInterpreterDemos/JvInterpreterSimple/JvInterpreterSimpleExpression.lpi @@ -4,6 +4,9 @@ <Version Value="12"/> <PathDelim Value="\"/> <General> + <Flags> + <CompatibilityMode Value="True"/> + </Flags> <SessionStorage Value="InProjectDir"/> <Title Value="JvInterpreterSimpleExpression"/> <Scaled Value="True"/> @@ -14,8 +17,8 @@ </XPManifest> <Icon Value="0"/> </General> - <BuildModes> - <Item Name="Default" Default="True"/> + <BuildModes Count="1"> + <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> @@ -24,30 +27,30 @@ <RunParams> <FormatVersion Value="2"/> </RunParams> - <RequiredPackages> - <Item> + <RequiredPackages Count="3"> + <Item1> <PackageName Value="JvCustomLazR"/> - </Item> - <Item> + </Item1> + <Item2> <PackageName Value="JvPascalInterpreterR"/> <MaxVersion Major="1" Release="6"/> - </Item> - <Item> + </Item2> + <Item3> <PackageName Value="LCL"/> - </Item> + </Item3> </RequiredPackages> - <Units> - <Unit> + <Units Count="2"> + <Unit0> <Filename Value="JvInterpreterSimpleExpression.lpr"/> <IsPartOfProject Value="True"/> - </Unit> - <Unit> + </Unit0> + <Unit1> <Filename Value="JvInterpreterSimpleExpressionFm.pas"/> <IsPartOfProject Value="True"/> <ComponentName Value="Form1"/> <HasResources Value="True"/> <ResourceBaseClass Value="Form"/> - </Unit> + </Unit1> </Units> </ProjectOptions> <CompilerOptions> @@ -69,16 +72,16 @@ </Linking> </CompilerOptions> <Debugging> - <Exceptions> - <Item> + <Exceptions Count="3"> + <Item1> <Name Value="EAbort"/> - </Item> - <Item> + </Item1> + <Item2> <Name Value="ECodetoolError"/> - </Item> - <Item> + </Item2> + <Item3> <Name Value="EFOpenError"/> - </Item> + </Item3> </Exceptions> </Debugging> </CONFIG> diff --git a/components/jvcllaz/examples/JvInterpreterDemos/JvInterpreterSimple/JvInterpreterSimpleExpression.lpr b/components/jvcllaz/examples/JvInterpreterDemos/JvInterpreterSimple/JvInterpreterSimpleExpression.lpr index 47651d451..b5941ecf1 100644 --- a/components/jvcllaz/examples/JvInterpreterDemos/JvInterpreterSimple/JvInterpreterSimpleExpression.lpr +++ b/components/jvcllaz/examples/JvInterpreterDemos/JvInterpreterSimple/JvInterpreterSimpleExpression.lpr @@ -9,7 +9,7 @@ uses {$R *.res} begin - Application.Scaled := True; + Application.Scaled:=True; Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run; diff --git a/components/jvcllaz/examples/JvNavigationPane/JvNavPaneDemo.lpi b/components/jvcllaz/examples/JvNavigationPane/JvNavPaneDemo.lpi index 7044e71b1..97dd6a581 100644 --- a/components/jvcllaz/examples/JvNavigationPane/JvNavPaneDemo.lpi +++ b/components/jvcllaz/examples/JvNavigationPane/JvNavPaneDemo.lpi @@ -89,14 +89,14 @@ <Unit7> <Filename Value="..\..\run\JvCore\jvjclutils.pas"/> <UnitName Value="JvJCLUtils"/> - <EditorIndex Value="9"/> + <EditorIndex Value="5"/> <TopLine Value="1062"/> <CursorPos X="23" Y="1080"/> <UsageCount Value="10"/> <Loaded Value="True"/> </Unit7> <Unit8> - <Filename Value="c:\lazarus-trunk_fpc304\lcl\lcltype.pp"/> + <Filename Value="C:\lazarus-trunk_fpc304\lcl\lcltype.pp"/> <UnitName Value="LCLType"/> <EditorIndex Value="8"/> <TopLine Value="230"/> @@ -105,7 +105,7 @@ <Loaded Value="True"/> </Unit8> <Unit9> - <Filename Value="c:\lazarus-trunk_fpc304\lcl\graphics.pp"/> + <Filename Value="C:\lazarus-trunk_fpc304\lcl\graphics.pp"/> <UnitName Value="Graphics"/> <EditorIndex Value="7"/> <TopLine Value="1125"/> @@ -116,14 +116,14 @@ <Unit10> <Filename Value="..\..\run\JvCore\jvexcontrols.pas"/> <UnitName Value="JvExControls"/> - <EditorIndex Value="5"/> + <EditorIndex Value="4"/> <TopLine Value="237"/> <CursorPos X="14" Y="254"/> <UsageCount Value="10"/> <Loaded Value="True"/> </Unit10> <Unit11> - <Filename Value="c:\lazarus-trunk_fpc304\lcl\controls.pp"/> + <Filename Value="C:\lazarus-trunk_fpc304\lcl\controls.pp"/> <UnitName Value="Controls"/> <EditorIndex Value="6"/> <TopLine Value="162"/> @@ -133,7 +133,7 @@ </Unit11> <Unit12> <Filename Value="D:\lazarus202_fpc304_win64\fpc\3.0.4\source\rtl\inc\objpas.inc"/> - <EditorIndex Value="4"/> + <EditorIndex Value="9"/> <TopLine Value="537"/> <CursorPos X="38" Y="550"/> <UsageCount Value="10"/> diff --git a/components/jvcllaz/examples/JvPanel/JvPanelDemo.lpi b/components/jvcllaz/examples/JvPanel/JvPanelDemo.lpi index 87ffd79fc..67de751d6 100644 --- a/components/jvcllaz/examples/JvPanel/JvPanelDemo.lpi +++ b/components/jvcllaz/examples/JvPanel/JvPanelDemo.lpi @@ -4,6 +4,9 @@ <Version Value="12"/> <PathDelim Value="\"/> <General> + <Flags> + <CompatibilityMode Value="True"/> + </Flags> <SessionStorage Value="InProjectDir"/> <Title Value="JvPanelDemo"/> <Scaled Value="True"/> @@ -14,8 +17,8 @@ </XPManifest> <Icon Value="0"/> </General> - <BuildModes> - <Item Name="Default" Default="True"/> + <BuildModes Count="1"> + <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> @@ -23,7 +26,6 @@ </PublishOptions> <RunParams> <FormatVersion Value="2"/> - <Modes Count="0"/> </RunParams> <RequiredPackages Count="2"> <Item1> @@ -33,18 +35,18 @@ <PackageName Value="LCL"/> </Item2> </RequiredPackages> - <Units> - <Unit> + <Units Count="2"> + <Unit0> <Filename Value="JvPanelDemo.lpr"/> <IsPartOfProject Value="True"/> - </Unit> - <Unit> + </Unit0> + <Unit1> <Filename Value="main.pas"/> <IsPartOfProject Value="True"/> <ComponentName Value="MainForm"/> <HasResources Value="True"/> <ResourceBaseClass Value="Form"/> - </Unit> + </Unit1> </Units> </ProjectOptions> <CompilerOptions> diff --git a/components/jvcllaz/examples/JvPicClip/main.lfm b/components/jvcllaz/examples/JvPicClip/main.lfm index 7160c5029..54476e7ea 100644 --- a/components/jvcllaz/examples/JvPicClip/main.lfm +++ b/components/jvcllaz/examples/JvPicClip/main.lfm @@ -8,7 +8,7 @@ object Form1: TForm1 ClientHeight = 213 ClientWidth = 320 OnCreate = FormCreate - LCLVersion = '2.1.0.0' + LCLVersion = '2.0.10.0' object CombinedImage: TImage AnchorSideLeft.Control = Owner AnchorSideTop.Control = Owner diff --git a/components/jvcllaz/examples/JvPicClip/main.pas b/components/jvcllaz/examples/JvPicClip/main.pas index bc9574e1a..d9a5a6b0a 100644 --- a/components/jvcllaz/examples/JvPicClip/main.pas +++ b/components/jvcllaz/examples/JvPicClip/main.pas @@ -97,20 +97,20 @@ var begin L := TStringList.Create; try - L.Add(FOLDER + 'JvMM/images/tjvbmpanimator.bmp'); //0 - L.Add(FOLDER + 'JvMM/images/tjvfullcoloraxiscombo.bmp'); - L.Add(FOLDER + 'JvMM/images/tjvfullcolorcircle.bmp'); - L.Add(FOLDER + 'JvMM/images/tjvfullcolorcircledialog.bmp'); - L.Add(FOLDER + 'JvMM/images/tjvfullcolorgroup.bmp'); - L.Add(FOLDER + 'JvMM/images/tjvfullcolorlabel.bmp'); - L.Add(FOLDER + 'JvMM/images/tjvfullcolorpanel.bmp'); - L.Add(FOLDER + 'JvMM/images/tjvfullcolorspacecombo.bmp'); - L.Add(FOLDER + 'JvMM/images/tjvfullcolortrackbar.bmp'); - L.Add(FOLDER + 'JvMM/images/tjvgradient.bmp'); - L.Add(FOLDER + 'JvMM/images/tjvgradientheaderpanel.bmp'); // 10 - L.Add(FOLDER + 'JvMM/images/tjvid3v2.bmp'); - L.Add(FOLDER + 'JvMM/images/tjvpicclip.bmp'); - L.Add(FOLDER + 'JvMM/images/tjvspecialprogress.bmp'); + L.Add(FOLDER + 'JvMM/images/tjvbmpanimator.png'); //0 + L.Add(FOLDER + 'JvMM/images/tjvfullcoloraxiscombo.png'); + L.Add(FOLDER + 'JvMM/images/tjvfullcolorcircle.png'); + L.Add(FOLDER + 'JvMM/images/tjvfullcolorcircledialog.png'); + L.Add(FOLDER + 'JvMM/images/tjvfullcolorgroup.png'); + L.Add(FOLDER + 'JvMM/images/tjvfullcolorlabel.png'); + L.Add(FOLDER + 'JvMM/images/tjvfullcolorpanel.png'); + L.Add(FOLDER + 'JvMM/images/tjvfullcolorspacecombo.png'); + L.Add(FOLDER + 'JvMM/images/tjvfullcolortrackbar.png'); + L.Add(FOLDER + 'JvMM/images/tjvgradient.png'); + L.Add(FOLDER + 'JvMM/images/tjvgradientheaderpanel.png'); // 10 + L.Add(FOLDER + 'JvMM/images/tjvid3v2.png'); + L.Add(FOLDER + 'JvMM/images/tjvpicclip.png'); + L.Add(FOLDER + 'JvMM/images/tjvspecialprogress.png'); L.Add(FOLDER + 'JvHMI/images/tjvdialbutton.bmp'); L.Add(FOLDER + 'JvHMI/images/tjvled.bmp'); L.Add(FOLDER + 'JvDB/images/tjvdbcalcedit.bmp'); @@ -118,12 +118,12 @@ begin L.Add(FOLDER + 'JvDB/images/tjvdbsearchcombobox.bmp'); L.Add(FOLDER + 'JvDB/images/tjvdbsearchedit.bmp'); L.Add(FOLDER + 'JvDB/images/tjvdbtreeview.bmp'); // 20 + L.Add(FOLDER + 'JvPageComps/images/tjvtabbar.bmp'); + L.Add(FOLDER + 'JvPageComps/images/tjvmoderntabbarpainter.bmp'); + L.Add(FOLDER + 'JvCustomControls/images/tjvownerdrawviewer.png'); L.Add(FOLDER + 'JvCustomControls/images/tjvimagelistviewer.png'); L.Add(FOLDER + 'JvCustomControls/images/tjvimagesviewer.png'); - L.Add(FOLDER + 'JvCustomControls/images/tjvmoderntabbarpainter.bmp'); L.Add(FOLDER + 'JvCustomControls/images/tjvoutlookbar.png'); - L.Add(FOLDER + 'JvCustomControls/images/tjvownerdrawviewer.png'); - L.Add(FOLDER + 'JvCustomControls/images/tjvtabbar.bmp'); L.Add(FOLDER + 'JvCustomControls/images/tjvthumbimage.png'); L.Add(FOLDER + 'JvCustomControls/images/tjvthumbnail.png'); L.Add(FOLDER + 'JvCustomControls/images/tjvthumbview.png'); diff --git a/components/jvcllaz/examples/JvSpecialImage/JvSpecialImageDemo.lpi b/components/jvcllaz/examples/JvSpecialImage/JvSpecialImageDemo.lpi index 861368498..68106aec3 100644 --- a/components/jvcllaz/examples/JvSpecialImage/JvSpecialImageDemo.lpi +++ b/components/jvcllaz/examples/JvSpecialImage/JvSpecialImageDemo.lpi @@ -4,6 +4,9 @@ <Version Value="12"/> <PathDelim Value="\"/> <General> + <Flags> + <CompatibilityMode Value="True"/> + </Flags> <SessionStorage Value="InProjectDir"/> <Title Value="JvSpecialImageDemo"/> <Scaled Value="True"/> @@ -14,8 +17,8 @@ </XPManifest> <Icon Value="0"/> </General> - <BuildModes> - <Item Name="Default" Default="True"/> + <BuildModes Count="1"> + <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> @@ -24,27 +27,27 @@ <RunParams> <FormatVersion Value="2"/> </RunParams> - <RequiredPackages> - <Item> + <RequiredPackages Count="2"> + <Item1> <PackageName Value="JvMMLazR"/> - </Item> - <Item> + </Item1> + <Item2> <PackageName Value="LCL"/> - </Item> + </Item2> </RequiredPackages> - <Units> - <Unit> + <Units Count="2"> + <Unit0> <Filename Value="JvSpecialImageDemo.lpr"/> <IsPartOfProject Value="True"/> - </Unit> - <Unit> + </Unit0> + <Unit1> <Filename Value="jvspecialimagedemoform.pas"/> <IsPartOfProject Value="True"/> <ComponentName Value="Form1"/> <HasResources Value="True"/> <ResourceBaseClass Value="Form"/> <UnitName Value="JvSpecialImageDemoForm"/> - </Unit> + </Unit1> </Units> </ProjectOptions> <CompilerOptions> @@ -66,16 +69,16 @@ </Linking> </CompilerOptions> <Debugging> - <Exceptions> - <Item> + <Exceptions Count="3"> + <Item1> <Name Value="EAbort"/> - </Item> - <Item> + </Item1> + <Item2> <Name Value="ECodetoolError"/> - </Item> - <Item> + </Item2> + <Item3> <Name Value="EFOpenError"/> - </Item> + </Item3> </Exceptions> </Debugging> </CONFIG> diff --git a/components/jvcllaz/run/JvMM/jvpicclip.pas b/components/jvcllaz/run/JvMM/jvpicclip.pas index 61d3f8d3e..1b77f32bf 100644 --- a/components/jvcllaz/run/JvMM/jvpicclip.pas +++ b/components/jvcllaz/run/JvMM/jvpicclip.pas @@ -88,7 +88,6 @@ implementation uses SysUtils, - //Consts, JvJVCLUtils, JvConsts; constructor TJvPicClip.Create(AOwner: TComponent); diff --git a/components/jvcllaz/run/JvPascalInterpreter/JvInterpreter.pas b/components/jvcllaz/run/JvPascalInterpreter/JvInterpreter.pas index cf1c14174..894bf54d2 100644 --- a/components/jvcllaz/run/JvPascalInterpreter/JvInterpreter.pas +++ b/components/jvcllaz/run/JvPascalInterpreter/JvInterpreter.pas @@ -6120,7 +6120,7 @@ begin if TVarData(Variable).VType = varArray then begin {Get array value} - PP := PJvInterpreterArrayRec(NativeInt(JvInterpreterVarAsType(Variable, varInteger))); + PP := PJvInterpreterArrayRec(PtrInt(JvInterpreterVarAsType(Variable, varInteger))); if Args.Count > PP.Dimension then JvInterpreterError(ieArrayTooManyParams, -1) else @@ -6199,7 +6199,7 @@ begin if TVarData(Variable).VType = varArray then begin { Get array value } - PP := PJvInterpreterArrayRec(NativeInt(JvInterpreterVarAsType(Variable, varInteger))); + PP := PJvInterpreterArrayRec(PtrInt(JvInterpreterVarAsType(Variable, varInteger))); if Args.Count > PP.Dimension then JvInterpreterError(ieArrayTooManyParams, -1) else diff --git a/components/jvcllaz/run/JvPascalInterpreter/JvInterpreterFm.pas b/components/jvcllaz/run/JvPascalInterpreter/JvInterpreterFm.pas index 98ad9cf0b..304a9016e 100644 --- a/components/jvcllaz/run/JvPascalInterpreter/JvInterpreterFm.pas +++ b/components/jvcllaz/run/JvPascalInterpreter/JvInterpreterFm.pas @@ -144,7 +144,7 @@ var implementation uses - TypInfo, LazFileUtils, + Variants, TypInfo, LazFileUtils, JvResources, JvTypes, JvJCLUtils; @@ -681,28 +681,28 @@ end; procedure JvInterpreter_JvInterpreterRunFormModal(var Value: Variant; Args: TJvInterpreterArgs); begin - Value := JvInterpreterRunFormModal(Args.Values[0]); + Value := JvInterpreterRunFormModal(VarToStr(Args.Values[0])); end; { function JvInterpreterRunForm(const FileName: TFileName): TForm; } procedure JvInterpreter_JvInterpreterRunForm(var Value: Variant; Args: TJvInterpreterArgs); begin - Value := O2V(JvInterpreterRunForm(Args.Values[0])); + Value := O2V(JvInterpreterRunForm(VarToStr(Args.Values[0]))); end; { function JvInterpreterMakeForm(const FileName: TFileName): TForm; } procedure JvInterpreter_JvInterpreterMakeForm(var Value: Variant; Args: TJvInterpreterArgs); begin - Value := O2V(JvInterpreterMakeForm(Args.Values[0])); + Value := O2V(JvInterpreterMakeForm(VarToStr(Args.Values[0]))); end; { function JvInterpreterRunUnit(const FileName: TFileName): Variant } procedure JvInterpreter_JvInterpreterRunUnit(var Value: Variant; Args: TJvInterpreterArgs); begin - Value := JvInterpreterRunUnit(Args.Values[0]); + Value := JvInterpreterRunUnit(VarToStr(Args.Values[0])); end; procedure JvInterpreterRunReportPreview(const AFileName: string);