Skip to content

Commit a909e28

Browse files
author
delphidabbler
committed
Remove CheckForUpdates method from external object
1 parent 9429bd1 commit a909e28

File tree

2 files changed

+12
-32
lines changed

2 files changed

+12
-32
lines changed

Src/ExternalObj.ridl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,6 @@ library ExternalObj
8686
HRESULT _stdcall ShowNews(void);
8787
[id(0x00000071)]
8888

89-
/*
90-
* Check for program updates.
91-
*/
92-
HRESULT _stdcall CheckForUpdates(void);
93-
[id(0x00000072)]
94-
9589
/*
9690
* Display the program's About box.
9791
*/

Src/UWBExternal.pas

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ interface
2626

2727

2828
type
29-
/// <summary>COM object that implements the methods of the IWBExternal12
29+
/// <summary>COM object that implements the methods of the IWBExternal14
3030
/// interface that extend the browser control's 'external' object.</summary>
3131
/// <remarks>
3232
/// <para>This class enables application code to be called from JavaScript
3333
/// running in the browser control.</para>
3434
/// <para>The methods a declared in the type library that is defined in
3535
/// External.idl.</para>
3636
/// </remarks>
37-
TWBExternal = class(TAutoIntfObject, IWBExternal13, ISetNotifier)
37+
TWBExternal = class(TAutoIntfObject, IWBExternal14, ISetNotifier)
3838
strict private
3939
var
4040
/// <summary>Object used to call application code in response to
@@ -54,7 +54,7 @@ TWBExternal = class(TAutoIntfObject, IWBExternal13, ISetNotifier)
5454
constructor Create;
5555

5656
/// <summary>Updates database from internet.</summary>
57-
/// <remarks>Method of IWBExternal12.</remarks>
57+
/// <remarks>Method of IWBExternal14.</remarks>
5858
procedure UpdateDbase; safecall;
5959

6060
/// <summary>Displays a named snippet.</summary>
@@ -64,20 +64,20 @@ TWBExternal = class(TAutoIntfObject, IWBExternal13, ISetNotifier)
6464
/// defined.</param>
6565
/// <param name="NewTab">WordBool [in] Whether to display snippet in a new
6666
/// tab.</param>
67-
/// <remarks>Method of IWBExternal12.</remarks>
67+
/// <remarks>Method of IWBExternal14.</remarks>
6868
procedure DisplaySnippet(const SnippetName: WideString;
6969
UserDefined: WordBool; NewTab: WordBool); safecall;
7070

7171
/// <summary>Displays the Configure Compilers dialogue box.</summary>
72-
/// <remarks>Method of IWBExternal12.</remarks>
72+
/// <remarks>Method of IWBExternal14.</remarks>
7373
procedure ConfigCompilers; safecall;
7474

7575
/// <summary>Edits a named snippet.</summary>
7676
/// <param name="SnippetName">WideString [in] Name of snippet to be edited.
7777
/// </param>
7878
/// <remarks>
7979
/// <para>The named snippet must be user defined.</para>
80-
/// <para>Method of IWBExternal13.</para>
80+
/// <para>Method of IWBExternal14.</para>
8181
/// </remarks>
8282
procedure EditSnippet(const SnippetName: WideString); safecall;
8383

@@ -86,30 +86,26 @@ TWBExternal = class(TAutoIntfObject, IWBExternal13, ISetNotifier)
8686
/// </param>
8787
/// <param name="NewTab">WordBool [in] Whether to display category in a new
8888
/// tab.</param>
89-
/// <remarks>Method of IWBExternal13.</remarks>
89+
/// <remarks>Method of IWBExternal14.</remarks>
9090
procedure DisplayCategory(const CatID: WideString; NewTab: WordBool);
9191
safecall;
9292

9393
/// <summary>Opens Snippet Editor ready to create a new snippet.</summary>
94-
/// <remarks>Method of IWBExternal13.</remarks>
94+
/// <remarks>Method of IWBExternal14.</remarks>
9595
procedure NewSnippet; safecall;
9696

9797
/// <summary>Shows latest news items from CodeSnip news feed.</summary>
98-
/// <remarks>Method of IWBExternal13.</remarks>
98+
/// <remarks>Method of IWBExternal14.</remarks>
9999
procedure ShowNews; safecall;
100100

101-
/// <summary>Checks for program updates.</summary>
102-
/// <remarks>Method of IWBExternal13.</remarks>
103-
procedure CheckForUpdates; safecall;
104-
105101
/// <summary>Displays the program's About Box.</summary>
106-
/// <remarks>Method of IWBExternal13.</remarks>
102+
/// <remarks>Method of IWBExternal14.</remarks>
107103
procedure ShowAboutBox; safecall;
108104

109105
/// <summary>Displays specified page of the Preferences dialogue.</summary>
110106
/// <param name="ClsName">WideString [in] Class name of the frame that
111107
/// implements the required preferences page.</param>
112-
/// <remarks>Method of IWBExternal13.</remarks>
108+
/// <remarks>Method of IWBExternal14.</remarks>
113109
procedure ShowPrefsPage(const ClsName: WideString); safecall;
114110

115111
/// <summary>Records the notifier object that is used to call application
@@ -133,16 +129,6 @@ implementation
133129

134130
{ TWBExternal }
135131

136-
procedure TWBExternal.CheckForUpdates;
137-
begin
138-
try
139-
if Assigned(fNotifier) then
140-
fNotifier.CheckForUpdates;
141-
except
142-
HandleException;
143-
end;
144-
end;
145-
146132
procedure TWBExternal.ConfigCompilers;
147133
begin
148134
try
@@ -162,7 +148,7 @@ constructor TWBExternal.Create;
162148
ExeName := TAppInfo.AppExeFilePath;
163149
OleCheck(LoadTypeLib(PWideChar(ExeName), TypeLib));
164150
// Create the object using type library
165-
inherited Create(TypeLib, IWBExternal13);
151+
inherited Create(TypeLib, IWBExternal14);
166152
end;
167153

168154
procedure TWBExternal.DisplayCategory(const CatID: WideString;

0 commit comments

Comments
 (0)