Skip to content

Commit 66d03fd

Browse files
Fixed issue #93:
Changed parameter in IUICommandHandler.UpdateProperty from "var" to "out", as it used to be.
1 parent 409e6d8 commit 66d03fd

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Lib/UIRibbonActions.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ TRibbonCollectionAction = class(TRibbonAction<TUICommandCollection>)
170170
/// Update handler for TUICommand.UpdateProperty. We assign this handler to the commands' OnUpdateProperty event, so that we can remove
171171
/// them from the collection as soon as they become invisible.
172172
/// </summary>
173-
procedure PropertyUpdated(Sender: TObject; const PropKey: TUIPropertyKey; var NewValue: TPropVariant; var Handled: boolean);
173+
procedure PropertyUpdated(Sender: TObject; const PropKey: TUIPropertyKey; var NewValue: TPropVariant; out Handled: boolean);
174174
/// <summary>
175175
/// This method uses the action items that are stored in the internal list fActionList,
176176
/// and dynamically creates commands that will be added to the collection.
@@ -692,7 +692,7 @@ function TRibbonCollectionAction.Update(): Boolean;
692692
RefreshCommandCollection;
693693
end;
694694

695-
procedure TRibbonCollectionAction.PropertyUpdated(Sender: TObject; const PropKey: TUIPropertyKey; var NewValue: TPropVariant; var Handled: boolean);
695+
procedure TRibbonCollectionAction.PropertyUpdated(Sender: TObject; const PropKey: TUIPropertyKey; var NewValue: TPropVariant; out Handled: boolean);
696696
var
697697
lActionVisible: Boolean;
698698
begin

Lib/UIRibbonApi.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ function UIHsb(const Hue, Saturation, Brightness: Byte): TUIHsbColor; inline;
508508

509509
// Informs of the current value of a property, and queries for the new one
510510
function UpdateProperty(CommandId: UInt32; const Key: TUIPropertyKey;
511-
CurrentValue: PPropVariant; var NewValue: TPropVariant): HRESULT; stdcall;
511+
CurrentValue: PPropVariant; out NewValue: TPropVariant): HRESULT; stdcall;
512512
end;
513513

514514
// Types of UI commands

Lib/UIRibbonCommands.pas

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ TUICommandExecutionProperties = class
139139
TUIImage = class;
140140

141141
TUICommandUpdatePropertyEvent = procedure (Sender: TObject; const PropKey: TUIPropertyKey;
142-
var NewValue: TPropVariant; var Handled: boolean) of object;
142+
var NewValue: TPropVariant; out Handled: boolean) of object;
143143

144144
TUICommandUpdateHintEvent = procedure (Sender: TObject; const Value: string) of object;
145145

@@ -193,7 +193,7 @@ TUICommand = class abstract(TComponent, IUICommandHandler)
193193
CommandExecutionProperties: IUISimplePropertySet): HRESULT; stdcall;
194194

195195
function UpdateProperty(CommandId: UInt32; const Key: TUIPropertyKey;
196-
CurrentValue: PPropVariant; var NewValue: TPropVariant): HRESULT; stdcall;
196+
CurrentValue: PPropVariant; out NewValue: TPropVariant): HRESULT; stdcall;
197197
procedure SetLargeImage(const Value: TUIImage);
198198
strict private
199199
procedure ImageChanged(Sender: TObject);
@@ -2217,7 +2217,7 @@ procedure TUICommand.SetTooltipTitle(const Value: String);
22172217
end;
22182218

22192219
function TUICommand.UpdateProperty(CommandId: UInt32; const Key: TUIPropertyKey;
2220-
CurrentValue: PPropVariant; var NewValue: TPropVariant): HRESULT;
2220+
CurrentValue: PPropVariant; out NewValue: TPropVariant): HRESULT;
22212221
var
22222222
Prop: TUIProperty;
22232223
begin

0 commit comments

Comments
 (0)