### Example Procedure Implementation
Source: https://github.com/project-jedi/jvcl/blob/master/websites/JVCL2/guidelines.htm
An example of a procedure implementation with local variable declarations. Assertions can be included here for pre/post-conditions.
```pascal
procedure TJvScreen.DemoEventHandler(
Sender: TObject;
Col : LongInt;
Row : Longint;
Rect : TRect;
State : TGridDrawState); // Refer to notes
var
i,
j,
ThisNum,
ThatNum: integer;
IsAlive,
IsPurple: Boolean;
begin
()
end;
```
--------------------------------
### JvPanel Documentation Example
Source: https://github.com/project-jedi/jvcl/blob/master/websites/JVCL3/GuideLines.htm
Example of documentation format for JEDI-VCL components using Doc-O-Matic. Includes version, author, and description for the component and its members.
```text
@@JvPanel.pas
Note:
Delphi Versions:5, 6
C++ Builder Versions:none
Conditions:
The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html
Author:
Sebastien Buysse
Version:
1.20 Beta
\================================================================
@@TJvPanel
Description:
This is an enhanced version of a TPanel with some new events like OnMouseEnter and OnMouseLeave, ...
\================================================================
@@TJvPanel.FColor
Description:
This field stores the Color value of the JvPanel
\================================================================
@@TJvPanel.FOnMouseEnter
Description:
An event that occurs when the mouse pointer enters the borders of an editor.
.
.
.
```
--------------------------------
### Basic XML Configuration File Example
Source: https://github.com/project-jedi/jvcl/blob/master/jvcl/help/package_generator.html
This is a basic example of an XML configuration file used by pgEdit. It defines models for package generation, including target platforms and aliases.
```xml
..\..\run0
```
--------------------------------
### TJvUIBQuery Open Method Example
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIB/Help.htm
Example of using the Open method of TJvUIBQuery for SELECT statements, including parameter binding. The QuickScript property cannot be used with this method.
```pascal
Query.SQL.Text := 'SELECT FIRST_NAME, LAST_NAME, SALARY FROM EMPLOYEE WHERE DEPT_NO = ?';
Query.Params.AsInteger[0] := 623;
Query.Open;
while not Query.EOF do
with Query, Fields do
begin
```
--------------------------------
### Install and Configure TJvTrayIcon
Source: https://context7.com/project-jedi/jvcl/llms.txt
Installs a system tray icon, sets its hint text, assigns a popup menu, configures visibility options, and enables icon animation from an image list. Ensure JvTrayIcon is active to display the icon.
```Pascal
uses JvTrayIcon;
procedure TForm1.FormCreate(Sender: TObject);
begin
JvTrayIcon1.Icon := Application.Icon;
JvTrayIcon1.Hint := 'MyApp is running';
JvTrayIcon1.PopupMenu := TrayPopupMenu;
JvTrayIcon1.Visibility := [tvVisibleTaskBar, tvVisibleTaskList,
tvAutoHide, tvRestoreDbClick];
JvTrayIcon1.Active := True;
// Animate through an image list
JvTrayIcon1.Icons := TrayImageList;
JvTrayIcon1.Animated := True;
JvTrayIcon1.Delay := 200; // ms per frame
end;
```
--------------------------------
### Path Manipulation Function Example
Source: https://github.com/project-jedi/jvcl/blob/master/websites/JVCL2/delphistyleguide.htm
Example of a function to add an extension to a path, ensuring correct formatting and handling of existing extensions.
```delphi
function PathAddExtension(const Path, Extension: string): string;
begin
Result := Path;
if (Path <> '') and (ExtractFileExt(Path) = '') and (Extension <> '') then
begin
if Extension[1] = '.' then
Result := Result + Extension
else
Result := Result + '.' + Extension;
end;
end;
```
--------------------------------
### GetDivStart
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Calculates the starting point of a division on a line, given a total length and number of divisions.
```APIDOC
## GetDivStart
### Description
Assuming a line of length TotalLength is divided into DivCount pieces of roughly equal length, this function will return a point on the line where the division that X falls in starts (assuming the start of the line is X = 0).
### Function Signature
function GetDivStart(TotalLength, DivCount, X: Integer): Integer;
### Parameters
* **TotalLength** (Integer) - The total length of the line.
* **DivCount** (Integer) - The number of divisions.
* **X** (Integer) - The point on the line.
```
--------------------------------
### Delphi Method Naming (Bad Examples)
Source: https://github.com/project-jedi/jvcl/blob/master/websites/JVCL2/delphistyleguide.htm
Examples of incorrect method naming, including noun phrases, incorrect capitalization, and use of underscores.
```delphi
MouseButton
```
```delphi
drawCircle
```
```delphi
add_layout_component
```
```delphi
ServerRunning
```
--------------------------------
### Transaction Management Example
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIB/Help.htm
Demonstrates creating and managing transactions with TJvUIBTransaction and TJvUIBQuery components, including automatic rollback on error and commit on destruction.
```pascal
procedure TForm1.BtOpenClick(Sender: TObject);
var
Transaction: TJvUIBTransaction;
Query1: TJvUIBQuery;
Query2: TJvUIBQuery;
begin
Transaction := TJvUIBTransaction.Create(nil);
Query1 := TJvUIBQuery.Create(nil);
Query2 := TJvUIBQuery.Create(nil);
try
Transaction.DataBase := DataBase;
Query1.Transaction := Transaction;
Query2.Transaction := Transaction;
try
Query1.SQL.Text := 'SELECT * FROM MYTABLE1;'
Query1.Open; // transaction started (Rule 1)
while not Query1.Eof do
begin
// ...
Query1.Next;
end;
Query1.Close; // Stay in transaction (default action)
Query2.SQL.Text := 'SELECT * FROM MYTABLE2';
Query2.Open; // transaction not started because Query1 have not closed the Transaction.
// On error the transaction is automatically rollbacked(Rule 3)
while not Query1.Eof do
begin
// ...
Query2.Next;
end;
Query2.Close(etmCommit); // Transaction Commited because Query1 is closed
// if Query1 not closed then CommitRetaining(Rule 2)
except
Transaction.RollBack; // on error transaction rollbacked
// ...
end;
finally
Query1.Free; // if transaction active then close & commit(Rule 4)
Query2.Free; // if transaction active then close & commit(Rule 4)
Transaction.Free;
end;
end;
```
--------------------------------
### Path Appending Function Example
Source: https://github.com/project-jedi/jvcl/blob/master/websites/JVCL2/delphistyleguide.htm
Demonstrates a function for appending a string to a path, with a check for an empty append string.
```delphi
function PathAppend(const Path, Append: string): string;
var
PathLength: Integer;
B1, B2: Boolean;
begin
if Append = '' then
Result := Path
```
--------------------------------
### Calculate Appointment Start and End Rows
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
CalcStartEndRows calculates the start and end rows for an appointment on a specific date, applying AdjustEndTime. It handles appointments spanning multiple dates.
```Pascal
procedure CalcStartEndRows(anAppt: TJvTFAppt; SchedDate: TDate; var StartRow, EndRow: Integer );
```
--------------------------------
### Simple Uses Declaration
Source: https://github.com/project-jedi/jvcl/blob/master/websites/JVCL3/StyleGuide.htm
Example of a simple uses declaration, listing required units separated by commas.
```pascal
uses
MyUnit;
```
--------------------------------
### Method Declaration Example
Source: https://github.com/project-jedi/jvcl/blob/master/websites/JVCL2/delphistyleguide.htm
Demonstrates a Delphi method declaration that spans multiple lines for readability. Parameters are listed on subsequent lines.
```delphi
procedure ImageUpdate(Image img, infoflags: Integer,
x: Integer, y: Integer, w: Integer, h: Integer)
```
--------------------------------
### TODO Comment Example
Source: https://github.com/project-jedi/jvcl/blob/master/websites/JVCL2/delphistyleguide.htm
Illustrates the use of the 'TODO:' tag for temporary comments that require future attention or changes.
```Pascal
// TODO: Change this to call Sort when it is fixed
List.MySort;
```
--------------------------------
### Block Comment for Class Description
Source: https://github.com/project-jedi/jvcl/blob/master/websites/JVCL2/delphistyleguide.htm
Provides an example of a block comment used to describe a class, detailing its purpose and functionality.
```Pascal
{ TPropertyEditor
Edits a property of a component, or list of components,
selected into the Object Inspector. The property
editor is created based on the type of the
property being edited as determined by the types
registered by...
etc...
GetXxxValue
Gets the value of the first property in the
Properties property. Calls the appropriate
TProperty GetXxxValue method to retrieve the
value.
SetXxxValue Sets the value of all the properties
in the Properties property. Calls the appropriate
TProperty SetXxxxValue methods to set the value. }
```
--------------------------------
### TJvTFHint.StartEndHint
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Displays start and end date/time information in a hint window at the specified coordinates. The display of dates is controlled by the ShowDates parameter.
```APIDOC
## TJvTFHint.StartEndHint
### Description
Call the StartEndHint method to display start/end information. The window will appear at control position (X, Y). The StartDate and EndDate will only be shown if ShowDates is true. The hint will appear immediately on the screen, ignoring the ShortPause property.
### Method
procedure StartEndHint(StartDate, EndDate: TDate; StartTime, EndTime: TTime; X, Y: Integer; ShowDates: Boolean );
```
--------------------------------
### TJvTFDays.RowEndTime
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Retrieves the end time of a specified row. For example, if a row starts at 10:00 AM and the Granularity is 15, this function returns 10:14:59 AM.
```APIDOC
## TJvTFDays.RowEndTime
### Description
This function will the end time of the given row. Example: If the given row's start time is 10:00am and the Granularity is set to 15, then RowEndTime will return 10:14:59am.
### Method
function RowEndTime(RowNum: Integer ): TTime;
```
--------------------------------
### Incorrect Object Pascal Block Comment Style for Methods
Source: https://github.com/project-jedi/jvcl/blob/master/websites/JVCL3/StyleGuide.htm
Shows an example of an incorrect block comment style for methods, using asterisks for decoration, which should be avoided according to the style guide.
```Object Pascal
// INCORRECT
procedure TMyObject.MyMethod;
{*****************************************************************
TMyObject.MyMethod
This routine allows you to execute code.
*****************************************************************}
begin
end;
```
--------------------------------
### Configure TJvAppStorage Backends
Source: https://context7.com/project-jedi/jvcl/llms.txt
Demonstrates setting up multiple storage backends (Registry and INI) with a sub-storage for overrides. Use BeginUpdate/EndUpdate for batch writes to suppress AutoFlush.
```pascal
uses JvAppIniStorage, JvAppRegistryStorage;
procedure TForm1.SetupStorage;
var
RegStore: TJvAppRegistryStorage;
IniStore: TJvAppIniStorage;
SubStorage: TJvAppSubStorage;
begin
// Primary store: Registry, root = HKCU\Software\MyApp
RegStore := TJvAppRegistryStorage.Create(Self);
RegStore.Root := 'Software\MyApp';
// Secondary store: INI file for user-specific overrides
IniStore := TJvAppIniStorage.Create(Self);
IniStore.FileName := ChangeFileExt(ParamStr(0), '.ini');
IniStore.StorageOptions.ReplaceCRLF := True;
// Link IniStore under RegStore path \UserSettings
SubStorage := RegStore.SubStorages.Add;
SubStorage.RootPath := 'UserSettings';
SubStorage.AppStorage := IniStore;
// Reading \UserSettings\Theme now transparently reads from the INI file
ShowMessage(RegStore.ReadString('\UserSettings\Theme', 'Default'));
// Batch update: suppress AutoFlush during multiple writes
RegStore.BeginUpdate;
try
RegStore.WriteString ('\App\Version', '3.51');
RegStore.WriteInteger('\App\BuildNum', 1234);
finally
RegStore.EndUpdate; // triggers a single Flush
end;
end;
```
--------------------------------
### Left Recursive Grammar Example
Source: https://github.com/project-jedi/jvcl/blob/master/tests/archive/jvcl/examples/Diagram1WebSiteScanner/Parser.htm
Presents a simple grammar for expressions that exhibits left recursion, leading to potential infinite loops during parsing.
```bnf
expr -> expr + term
expr -> expr - term
expr -> term
term -> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
```
--------------------------------
### Bad Type Name Examples
Source: https://github.com/project-jedi/jvcl/blob/master/websites/JVCL2/delphistyleguide.htm
Examples of type names to avoid, such as verb phrases or names using underscores.
```delphi
ManageLayout (verb phrase)
delphi_is_new_to_me (underscores)
```
--------------------------------
### Configure TJvWizard Navigation and Pages
Source: https://context7.com/project-jedi/jvcl/llms.txt
Set up wizard button captions, starting page, and handle page entry/exit events. Use OnExitPage to validate user input before proceeding.
```pascal
uses JvWizard, JvWizardCommon;
procedure TForm1.FormCreate(Sender: TObject);
begin
// Wizard already has pages added at design time
JvWizard1.ActivePage := JvWizardWelcomePage1; // start at welcome page
JvWizard1.ButtonBack.Caption := '< Back';
JvWizard1.ButtonNext.Caption := 'Next >';
JvWizard1.ButtonFinish.Caption := 'Install';
JvWizard1.ButtonCancel.Caption := 'Cancel';
JvWizard1.ShowDivider := True;
end;
procedure TForm1.JvWizardInteriorPage1EnterPage(
Sender: TJvWizardCustomPage; FromPage: TJvWizardCustomPage);
begin
// Pre-populate page controls based on data from previous pages
edName.Text := FCollectedName;
end;
procedure TForm1.JvWizardInteriorPage1ExitPage(
Sender: TJvWizardCustomPage; ToPage: TJvWizardCustomPage);
begin
// Validate before allowing navigation forward
if edName.Text = '' then
begin
ShowMessage('Name is required.');
Abort; // raising an exception stops the page transition
end;
FCollectedName := edName.Text;
end;
procedure TForm1.JvWizard1ButtonNextClick(Sender: TObject;
var Stop: Boolean);
begin
// Programmatic navigation: skip a page based on a checkbox
if chkSkipStep2.Checked and
(JvWizard1.ActivePage = JvWizardInteriorPage1) then
begin
JvWizard1.ActivePage := JvWizardInteriorPage3;
Stop := True; // prevent default Next behaviour
end;
end;
```
--------------------------------
### TJvTFAppt.StartTime
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Specifies the starting time of the appointment. Note that this property is read-only. You should set the start and end info by using the SetStartEnd method.
```APIDOC
## TJvTFAppt.StartTime
### Description
Specifies the starting time of the appointment.
Note that this property is read-only. You should set the start and end info by using the SetStartEnd method.
### Property
property StartTime: TTime;
```
--------------------------------
### Implementation Uses Clause and Resource
Source: https://github.com/project-jedi/jvcl/blob/master/websites/JVCL2/delphistyleguide.htm
The implementation section should list its uses clause first, followed by any include statements or directives, and then the resource directive.
```Pascal
implementation
uses
Consts, SysUtils, ActnList, ImgList;
{$R BUTTONS.RES}
```
--------------------------------
### TJvTFAppt.StartDate
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Specifies the starting date of the appointment. Note that this property is read-only. You should set the start and end info by using the SetStartEnd method.
```APIDOC
## TJvTFAppt.StartDate
### Description
Specifies the starting date of the appointment.
Note that this property is read-only. You should set the start and end info by using the SetStartEnd method.
### Property
property StartDate: TDate;
```
--------------------------------
### Execute Immediate SQL Statements
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIB/Help.htm
Fastest method for executing multiple, different SQL statements sequentially, similar to a script. Requires QuickScript to be True, with one SQL statement per line. Can use parameters but does not return results.
```Pascal
Query.QuickScript := True;
Query.SQL.Add('INSERT INTO COUNTRY (COUNTRY,CURRENCY) VALUES (''Test0'',''FFranc'')');
Query.SQL.Add('DELETE FROM COUNTRY WHERE COUNTRY = ''Test0''');
.../...
Query.ExecSQL;
Query.Close(etmCommit);
```
--------------------------------
### TJvTFAppt.StartDateTime
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Specifies the starting date and time of the appointment. Note that this property is read-only. You should set the start and end info by using the SetStartEnd method.
```APIDOC
## TJvTFAppt.StartDateTime
### Description
Specifies the starting date and time of the appointment.
Note that this property is read-only. You should set the start and end info by using the SetStartEnd method.
### Property
property StartDateTime: TDateTime;
```
--------------------------------
### OnQuickEntry
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Fires immediately after an appointment is created via the quick entry feature.
```APIDOC
## OnQuickEntry
### Description
This event will fire immediately after an appointment has been created using the quick entry feature. The newly created appointment will be selected and pointed to by the SelAppt property.
```
--------------------------------
### TJvAppStorage Usage Example
Source: https://context7.com/project-jedi/jvcl/llms.txt
Demonstrates how to use TJvAppIniStorage, a concrete descendant of TJvAppStorage, to read and write application settings to an INI file. It covers writing various data types, reading with defaults, storing/restoring components and string lists, and handling versioned data.
```APIDOC
## TJvAppStorage — Unified Application Settings Storage
`TJvAppStorage` (unit `JvAppStorage`) is an abstract base class that provides a single, backend-independent interface for reading and writing application settings. Concrete descendants include `TJvAppIniStorage` (INI files), `TJvAppRegistryStorage` (Windows Registry), `TJvAppXMLStorage` (XML files), and `TJvAppDBStorage` (database). Sub-storages can be linked so that one logical store transparently delegates path prefixes to another backend. Paths use backslash separators; leading backslash indicates an absolute root path.
```pascal
uses JvAppIniStorage, JvAppStorage;
procedure TMainForm.FormCreate(Sender: TObject);
var
Storage: TJvAppIniStorage;
begin
Storage := TJvAppIniStorage.Create(Self);
Storage.FileName := 'MyApp.ini';
Storage.AutoFlush := True; // persist every write immediately
Storage.AutoReload := True; // re-read before every read
// Write values
Storage.WriteString ('General\UserName', 'Alice');
Storage.WriteInteger('General\MaxRetries', 3);
Storage.WriteFloat ('Display\Zoom', 1.25);
Storage.WriteDateTime('Session\LastLogin', Now);
// Read values (with defaults)
Caption := Storage.ReadString ('General\UserName', 'Guest');
Width := Storage.ReadInteger('Window\Width', 800);
Height := Storage.ReadInteger('Window\Height', 600);
// Store/restore entire component's published properties
Storage.WriteComponent('\FormState', Self);
// Store/restore a TStringList
Storage.WriteStringList('\RecentFiles', RecentFilesList);
Storage.ReadStringList ('\RecentFiles', RecentFilesList);
// Store an object list with custom item creator
Storage.WriteObjectList('\Items', MyObjectList);
Storage.ReadObjectList ('\Items', MyObjectList,
function(Sender: TJvCustomAppStorage; const Path: string; Index: Integer): TPersistent
begin
Result := TMyItem.Create;
end);
// Versioned subtree: delete stored data if version mismatch
Storage.CheckDeletePathByVersion('\Cache', 2 {versionNumber});
Storage.Flush;
Storage.Free;
end;
```
```
--------------------------------
### Using TJvAppIniStorage for Application Settings
Source: https://context7.com/project-jedi/jvcl/llms.txt
Demonstrates how to use TJvAppIniStorage to read and write various data types to an INI file. Includes writing strings, integers, floats, and datetimes, as well as storing and restoring component properties and string lists. Also shows how to handle object lists and versioned data.
```Pascal
uses JvAppIniStorage, JvAppStorage;
procedure TMainForm.FormCreate(Sender: TObject);
var
Storage: TJvAppIniStorage;
begin
Storage := TJvAppIniStorage.Create(Self);
Storage.FileName := 'MyApp.ini';
Storage.AutoFlush := True; // persist every write immediately
Storage.AutoReload := True; // re-read before every read
// Write values
Storage.WriteString ('General\UserName', 'Alice');
Storage.WriteInteger('General\MaxRetries', 3);
Storage.WriteFloat ('Display\Zoom', 1.25);
Storage.WriteDateTime('Session\LastLogin', Now);
// Read values (with defaults)
Caption := Storage.ReadString ('General\UserName', 'Guest');
Width := Storage.ReadInteger('Window\Width', 800);
Height := Storage.ReadInteger('Window\Height', 600);
// Store/restore entire component's published properties
Storage.WriteComponent('\FormState', Self);
// Store/restore a TStringList
Storage.WriteStringList('\RecentFiles', RecentFilesList);
Storage.ReadStringList ('\RecentFiles', RecentFilesList);
// Store an object list with custom item creator
Storage.WriteObjectList('\Items', MyObjectList);
Storage.ReadObjectList ('\Items', MyObjectList,
function(Sender: TJvCustomAppStorage; const Path: string; Index: Integer): TPersistent
begin
Result := TMyItem.Create;
end);
// Versioned subtree: delete stored data if version mismatch
Storage.CheckDeletePathByVersion('\Cache', 2 {versionNumber});
Storage.Flush;
Storage.Free;
end;
```
--------------------------------
### Start TJvThread Execution
Source: https://context7.com/project-jedi/jvcl/llms.txt
Configures TJvThread for exclusive execution, automatic freeing upon termination, and assigns the OnExecute and OnFinish event handlers. The Execute method starts the background task without blocking the main thread.
```Pascal
procedure TForm1.btnStartClick(Sender: TObject);
var
Data: TMyData;
begin
Data.InputFile := 'C:\data\input.csv';
JvThread1.Exclusive := True;
JvThread1.RunOnCreate := True;
JvThread1.FreeOnTerminate := True;
JvThread1.OnExecute := DoWorkInThread;
JvThread1.OnFinish :=
procedure(Sender: TObject) begin lblStatus.Caption := 'Finished'; end;
JvThread1.Execute(@Data);
end;
```
--------------------------------
### TJvTFAppt.Create
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
This constructor is typically called by the server (TJvTFScheduleManager.RequestAppt or TJvTFScheduleManager.dbNewAppt) and should not be called directly. If manually creating an appointment, the server and optionally an ApptID must be specified. If an ApptID is provided, it must be unique.
```APIDOC
constructor Create(Serv: TJvTFScheduleManager; ApptID: String );
```
--------------------------------
### TJvMonthCalendar2.Height
Source: https://github.com/project-jedi/jvcl/blob/master/help/Archive/JVCL131/JVCL.dox
Gets or sets the height of the TJvMonthCalendar2.
```APIDOC
## TJvMonthCalendar2.Height
### Description
Gets or sets the height of the TJvMonthCalendar2 component.
### Property
Height
```
--------------------------------
### DFMCleaner Command-Line Usage
Source: https://github.com/project-jedi/jvcl/blob/master/jvcl/devtools/DFMCleaner/dc.txt
Illustrates the basic command-line syntax for using DFMCleaner. Specify options, file masks, and a required skiplist file.
```bash
dc.exe
```
--------------------------------
### TJvTFDaysPrinter.RowToTime
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Retrieves the starting time of a specified row.
```APIDOC
## TJvTFDaysPrinter.RowToTime
### Description
The RowToTime method returns the starting time of the row specified by RowNum.
### Method
Function RowToTime(RowNum: Integer): TTime;
```
--------------------------------
### Standard Procedure/Function Documentation Block
Source: https://github.com/project-jedi/jvcl/blob/master/websites/JVCL3/GuideLines.htm
This block should precede each procedure and function, providing essential details such as author, creation/modification dates, purpose, and known issues. The 'TODO' comment indicates that the status description needs updating.
```pascal
{------------------------------------------------------------------------------
Procedure: TJvScreen.DemoEventHandler
Description:
Author: Joe Doe
Date created: 2000-03-01
Date modified: yyyy-mm-dd by Jim Foo
Purpose:
Known Issues:
------------------------------------------------------------------------------}
procedure TJvScreen.DemoEventHandler(
Sender: TObject;
Col : LongInt;
Row : Longint;
Rect : TRect;
State : TGridDrawState); // Refer to notes
var
i,
j,
ThisNum,
ThatNum: integer;
IsAlive,
IsPurple: Boolean;
begin
()
end;
```
--------------------------------
### TJvTFDaysPrinter.VirtualGroupHdrRect
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Gets the bounding rectangle for a group header.
```APIDOC
## TJvTFDaysPrinter.VirtualGroupHdrRect
### Description
This method returns a bounding rectangle for the group header assigned to Col. The resultant rectangle is not clipped by the visible portion of the group header.
### Method
function VirtualGroupHdrRect(Col: Integer; PageInfo: TJvTFDaysPageInfo): TRect;
```
--------------------------------
### TJvTFDaysCol.Title Property
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Sets or gets the title for the column.
```APIDOC
## TJvTFDaysCol.Title
### Description
Use this property to specify the title of the column.
### Property
property Title: String;
```
--------------------------------
### Correct Function Declaration with Continuation Lines
Source: https://github.com/project-jedi/jvcl/blob/master/websites/JVCL2/delphistyleguide.htm
Demonstrates proper formatting for long function declarations using continuation lines, ensuring alignment and indentation.
```Pascal
function CreateWindowEx(dwExStyle: DWORD;
lpClassName: PChar; lpWindowName: PChar;
dwStyle: DWORD; X, Y, nWidth, nHeight: Integer;
hWndParent: HWND; hMenu: HMENU; hInstance: HINST;
lpParam: Pointer): HWND; stdcall;
```
--------------------------------
### TJvTFGlanceTextViewer.SelAppt
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Gets or sets the currently selected appointment.
```APIDOC
## SelAppt
### Description
This property will point to the currently selected appt. SelAppt will be nil if no appt is selected.
### Property Type
TJvTFAppt
```
--------------------------------
### Correct Procedure Declaration with Parameter Spacing
Source: https://github.com/project-jedi/jvcl/blob/master/websites/JVCL3/StyleGuide.htm
Illustrates correct spacing between parameters and their types in a procedure declaration.
```Pascal
procedure Foo(Param1: Integer; Param2: Integer);
```
--------------------------------
### TJvCheckBox.Caption
Source: https://github.com/project-jedi/jvcl/blob/master/help/Archive/JVCL131/JVCL.dox
Gets or sets the caption text for the TJvCheckBox.
```APIDOC
## TJvCheckBox.Caption
### Description
Gets or sets the text displayed next to the checkbox.
### Property
Caption
```
--------------------------------
### TJvTFDays.HourStartRow
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Returns the index of the row that starts a given hour.
```APIDOC
## TJvTFDays.HourStartRow
### Description
This function will return the index of the row that starts the hour given by Hour.
### Method Signature
function HourStartRow(Hour: Word ): Integer;
```
--------------------------------
### Bind Application Procedures/Methods for Script Use
Source: https://github.com/project-jedi/jvcl/blob/master/websites/JVCL2/JvInterpreter.htm
Bind application procedures, class methods, records, and enum types for use within the interpreter script. This is achieved by using methods like AddGet, AddClass, and AddSet on the global variable GlobalJvInterpreterAdapter, typically within the initialization part of your unit.
```Pascal
{
Example of binding (not actual code from source):
GlobalJvInterpreterAdapter.AddMethod('MyAppProc', @MyApplicationProcedure);
GlobalJvInterpreterAdapter.AddClass('MyClass', TMyClass);
}
```
--------------------------------
### TJvMonthCalendar2.OnStartDrag
Source: https://github.com/project-jedi/jvcl/blob/master/help/Archive/JVCL131/JVCL.dox
Event handler for when a drag operation starts on TJvMonthCalendar2.
```APIDOC
## TJvMonthCalendar2.OnStartDrag
### Description
Event handler for when a drag operation starts on the TJvMonthCalendar2.
### Event
OnStartDrag
```
--------------------------------
### TJvCaret.Create
Source: https://github.com/project-jedi/jvcl/blob/master/help/Archive/JVCL131/JVCL.dox
Constructor for the TJvCaret component.
```APIDOC
## TJvCaret.Create
### Description
Constructor for the TJvCaret component.
### Method
Create(@TCustomEdit)
```
--------------------------------
### TJvCaptionPanel.OnStartDrag
Source: https://github.com/project-jedi/jvcl/blob/master/help/Archive/JVCL131/JVCL.dox
Event handler for when a drag operation starts on TJvCaptionPanel.
```APIDOC
## TJvCaptionPanel.OnStartDrag
### Description
Event handler for when a drag operation starts on the TJvCaptionPanel.
### Event
OnStartDrag
```
--------------------------------
### TJvTFGlanceCell.RowIndex
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Gets the row index of the cell within its collection.
```APIDOC
## TJvTFGlanceCell.RowIndex
### Description
Specifies the index of the row the cell is found in.
### Property
property RowIndex: Integer;
```
--------------------------------
### Pascal procedure with type, const, and var sections
Source: https://github.com/project-jedi/jvcl/blob/master/websites/JVCL3/StyleGuide.htm
Shows the recommended order and structure for type, const, and var sections within a Pascal procedure. This promotes code readability and organization.
```pascal
procedure SomeProcedure;
type
TMyType = Integer;
const
ArraySize = 100;
var
MyArray: array [1..ArraySize] of TMyType;
begin
...
```
--------------------------------
### TJvCustomBox.ShowHint
Source: https://github.com/project-jedi/jvcl/blob/master/help/Archive/JVCL131/JVCL.dox
Enables or disables hint display for the TJvCustomBox.
```APIDOC
## TJvCustomBox.ShowHint
### Description
Enables or disables the display of hint text when the mouse hovers over the TJvCustomBox.
### Property
ShowHint
```
--------------------------------
### TJvTFGlanceCell.ColIndex
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Gets the column index of the cell within its collection.
```APIDOC
## TJvTFGlanceCell.ColIndex
### Description
Specifies the index of the column that the cell is found in.
### Property
property ColIndex: Integer;
```
--------------------------------
### Get Rectangle Width
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Returns the width of a TRect structure.
```Pascal
function RectWidth(aRect: TRect): Integer;
```
--------------------------------
### DFMCleaner Skiplist Format Examples
Source: https://github.com/project-jedi/jvcl/blob/master/jvcl/devtools/DFMCleaner/dc.txt
Shows the format for the skiplist file used by DFMCleaner to specify properties for removal. Supports wildcards and specific class-property pairs.
```plaintext
*.DesignSize - remove all DesignSize properties
TPageControl.TabIndex - remove TabIndex for TPageControl
```
--------------------------------
### Get Rectangle Height
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Returns the height of a TRect structure.
```Pascal
function RectHeight(aRect: TRect): Integer;
```
--------------------------------
### TJvTFSched.GetLastAppt
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Retrieves the latest appointment in the schedule, ignoring start times.
```APIDOC
## TJvTFSched.GetLastAppt
### Description
Returns the latest appointment in the schedule. (Start times are ignored.)
### Signature
function GetLastAppt: TJvTFAppt;
```
--------------------------------
### Database Query and HTML Table Generation with UIB
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIB/examples/JvUIB/Automation/UIBDemo.htm
Connects to an employee database, retrieves all records from the employee table, and generates an HTML table to display the results. Ensure the database file and UIB components are accessible.
```VBScript
Set Db = CreateObject("UIB.Database")
Db.DatabaseName = "D:\\employee.db"
Db.UserName = "SYSDBA"
Db.Password = "masterkey"
Db.Connected = True
Set TR = CreateObject("UIB.Transaction")
TR.DataBase = Db
Set QR = CreateObject("UIB.Query")
QR.Transaction = TR
QR.Sql = "select * from employee"
QR.Open
document.writeln("
")
document.writeln("
")
For F = 1 To QR.FieldCount
document.writeln("
"+QR.AliasName(F - 1)+"
")
Next
document.writeln("
")
While (Not QR.EOF)
document.writeln("
")
For F = 1 To QR.FieldCount
document.writeln("
" + Trim(QR.AsString(F - 1)+"
"))
Next
document.writeln("
")
QR.Next
Wend
document.writeln("
")
QR.Close (1)
```
--------------------------------
### TJvTFDays.RowToTime
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Returns the starting time of the row specified by the RowNum parameter.
```APIDOC
## TJvTFDays.RowToTime
### Description
The RowToTime method returns the starting time of the row specified by RowNum.
### Method
Function RowToTime(RowNum: Integer ): TTime;
```
--------------------------------
### DFMCleaner Options
Source: https://github.com/project-jedi/jvcl/blob/master/jvcl/devtools/DFMCleaner/dc.txt
Details the available command-line options for DFMCleaner, including in-place replacement, recursive folder traversal, and reading a skiplist.
```bash
-i - replace in-line (output overwrites input). If not given, output uses input's filename but with a "txt" extension
-s - recurse into sub-folders
-f - read skiplist from , REQUIRED. Do not preceed filename with spaces!
```
--------------------------------
### TJvBevel.OnStartDrag
Source: https://github.com/project-jedi/jvcl/blob/master/help/Archive/JVCL131/JVCL.dox
Event handler for when a drag operation starts on a TJvBevel component.
```APIDOC
## TJvBevel.OnStartDrag
### Description
Event handler for when a drag operation starts.
### Event
OnStartDrag
```
--------------------------------
### TJvTFWeeks.WeekCount Property
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Sets or gets the number of weeks to be displayed in the control.
```APIDOC
## TJvTFWeeks.WeekCount Property
### Description
Use this property to specify how many weeks will be shown in JvTFWeeks.
```
--------------------------------
### Configure TJvMemo Component
Source: https://context7.com/project-jedi/jvcl/llms.txt
Configure TJvMemo properties such as HotTrack, MaxLines, HideCaret, and Transparent. Also demonstrates setting up a custom caret shape and an OnVerticalScroll event handler to display the current line number.
```pascal
uses JvMemo, JvCaret;
procedure TForm1.FormCreate(Sender: TObject);
begin
JvMemo1.HotTrack := True; // highlight border on focus
JvMemo1.MaxLines := 500; // display at most 500 lines
JvMemo1.HideCaret := False;
JvMemo1.Transparent := False;
// Custom caret shape
JvMemo1.Caret.CaretType := ctCustom;
JvMemo1.Caret.Width := 2;
JvMemo1.Caret.Height := 18;
JvMemo1.Caret.Color := clBlack;
JvMemo1.OnVerticalScroll :=
procedure(Sender: TObject) begin
StatusBar1.Panels[0].Text :=
Format('Line %d', [JvMemo1.CaretPos.Y + 1]);
end;
end;
```
--------------------------------
### Correct try statement usage in Pascal
Source: https://github.com/project-jedi/jvcl/blob/master/websites/JVCL3/StyleGuide.htm
Demonstrates the correct structure for nested try-except-finally blocks in Pascal. Ensure proper handling of exceptions and resource cleanup.
```pascal
try
try
EnumThreadWindows(CurrentThreadID, @Disable, 0);
Result := TaskWindowList;
except
EnableTaskWindows(TaskWindowList);
raise;
end;
finally
TaskWindowList := SaveWindowList;
TaskActiveWindow := SaveActiveWindow;
end;
```
--------------------------------
### TJvTFGlanceCell.TitleText
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Gets or sets the text displayed in the cell's title.
```APIDOC
## TJvTFGlanceCell.TitleText
### Description
This property holds the text that will be displayed in the cell's title.
### Property
property TitleText: String;
```
--------------------------------
### Correct While Loop with Continuation Line
Source: https://github.com/project-jedi/jvcl/blob/master/websites/JVCL2/delphistyleguide.htm
Demonstrates the correct formatting for a while loop with a long condition, using a new line for the 'begin' statement and proper indentation.
```Pascal
while (LongExpression1 or LongExpression2) do
begin
// DoSomething
// DoSomethingElse;
end;
```
--------------------------------
### TJvTFDays.GridStartTime
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Specifies the starting time of the first row (row 0) in the grid.
```APIDOC
## TJvTFDays.GridStartTime
### Description
Use this property to specify the starting time of the first row (row 0) in the grid.
### Property
`GridStartTime: TTime;`
```
--------------------------------
### TJvCaretMemo.Create
Source: https://github.com/project-jedi/jvcl/blob/master/help/Archive/JVCL131/JVCL.dox
Constructor for the TJvCaretMemo component.
```APIDOC
## TJvCaretMemo.Create
### Description
Constructor for the TJvCaretMemo component.
### Method
Create(@TComponent)
```
--------------------------------
### TJvTFWeeks.DisplayDate Property
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIL Time Framework/HelpSource.txt
Sets or gets the specific date to navigate the week view to.
```APIDOC
## TJvTFWeeks.DisplayDate Property
### Description
Use this property to navigate JvTFWeeks to a week of a specific date.
```
--------------------------------
### Execute SQL Statements in Bulk
Source: https://github.com/project-jedi/jvcl/blob/master/donations/UIB/Help.htm
Optimized for bulk data operations (Data Pump). Prepares a query once and executes it multiple times. Not compatible with the QuickScript property.
```Pascal
const
Datas : array[1..10] of TARecord = (
(COUNTRY: 'blabla0'; CURRENCY: 'blabla'),
(COUNTRY: 'blabla1'; CURRENCY: 'blabla'),
(COUNTRY: 'blabla2'; CURRENCY: 'blabla'),
(COUNTRY: 'blabla3'; CURRENCY: 'blabla'),
(COUNTRY: 'blabla4'; CURRENCY: 'blabla'),
(COUNTRY: 'blabla5'; CURRENCY: 'blabla'),
(COUNTRY: 'blabla6'; CURRENCY: 'blabla'),
(COUNTRY: 'blabla7'; CURRENCY: 'blabla'),
(COUNTRY: 'blabla8'; CURRENCY: 'blabla'),
(COUNTRY: 'blabla9'; CURRENCY: 'blabla'));
begin
for i := 1 to 10 do
begin
Query.Params.AsString[0] := Datas[i].COUNTRY;
Query.Params.AsString[1] := Datas[i].CURRENCY;
Query.Execute;
// for better performance commit every 1000 records
// Transaction.Commit;
end;
Query.Close(etmRollback); // change to etmCommit to apply.
```