View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001987 | JEDI VCL | 04 Feature Request | public | 2004-07-20 17:30 | 2004-09-03 06:15 |
Reporter | glchapman | Assigned To | AHUser | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | resolved | Resolution | fixed | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0001987: Add AutoComplete support to JvToolEdit for pre-D7 compilers | ||||
Description | It doesn't take much code to enable the AutoComplete features in JvToolEdit with Delphi compilers before D7. I'm attaching a zip file which has a small unit which defines the necessary interfaces, plus a patched JvToolEdit.pas and a diff with JvToolEdit.pas from current CVS. Of course, if you want to add this feature, and if you decide to add a small support unit as I did, you'll also have to patch the relevant packages. | ||||
Additional Information | I made a few other changes to JvToolEdit. First, I removed the calls to CoInitialize and CoUninitialize; instead, the uses now references ComObj (I've always assumed that was the right way to make sure CoInitialize was called, but perhaps this can cause subtle problems I don't know about?). Second, I added an except block to TAutoCompleteSource.Clone, since Delphi constructors can raise exceptions (though it actually might be better to skip creating the new object and simply return E_NOTIMPL). Finally, I changed various references to IID_IXXX to just plain IXXX. | ||||
Tags | No tags attached. | ||||
2004-07-20 17:30
|
JvToolEdit_AutoComplete.zip (34,173 bytes) |
|
Thanks for the elaborate report. I don't have D6 at home thus won't make the pre-D7 specific changes (can't test). > I removed the calls to CoInitialize and CoUninitialize; instead, the > uses now references ComObj ComObj.pas is quite large. I suspect calling CoInitialize and CoUninitialize multiple times doesn't add overhead, and its use is pretty straight forward; thus I didn't commit that part of your solution. |
|
Addendum: ComObj only calls CoInitialize automagically when "Application.Initialize" is present in the dpr. I, for one, sometimes remove it because it can cause problems with certain apps and can also wreak havoc with chm help files. In short, if something relies on CoInitialize, it should be called explicitly. Remko, I think you can close this report now. |
|
> Remko, I think you can close this report now. The original problem that autocomplete is only supported by D7 and not by D5, D6 still exists. I don't have D6 at home thus won't make the pre-D7 specific changes (can't test). |
|
Can you outline what those "pre-D7" changes are? (note: I haven't had a look at the attached file) |
|
The only difference AFAICS is that D5&D6 are missing some const & types, there are no code diffs. The consts & types are defined in D7 in ShlObj.pas, such as IAutoComplete, IAutoComplete2 and the ACO_ consts. The zip file contains a diff log. |
|
I got an email indicating that this entry needs my comment. Looking at the CVS, I see a check-in has been made with the comment "Add AutoComplete support to JvToolEdit for pre-D7 compilers" -- but it doesn't appear to do that, since all the {$IFDEF COMPILER7_UP} directives are still in place. Anyway I redid the patch against the current CVS source. The new zip file contains my patched JvToolEdit.pas, a diff file against current CVS, and ShlAutoComplete.pas, which is a unit containing the definitions missing from pre-D7 ShlObj. |
2004-08-06 13:11
|
JvToolEdit_AutoComplete.2.zip (35,563 bytes) |
|
I forgot to add that this latest patch leaves CoInitialize/CoUninitialize in place, and does not use ComObj. |
|
Just a reminder for OBones. |
|
Added to CVS. |
Date Modified | Username | Field | Change |
---|---|---|---|
2004-07-20 17:30 | glchapman | New Issue | |
2004-07-20 17:30 | glchapman | File Added: JvToolEdit_AutoComplete.zip | |
2004-08-02 15:13 | remkobonte | Note Added: 0004871 | |
2004-08-04 06:03 |
|
Note Added: 0004923 | |
2004-08-04 13:10 | remkobonte | Note Added: 0004930 | |
2004-08-05 23:19 | obones | Note Added: 0004946 | |
2004-08-06 02:22 |
|
Status | new => feedback |
2004-08-06 12:31 | remkobonte | Note Added: 0004950 | |
2004-08-06 13:10 | glchapman | Note Added: 0004951 | |
2004-08-06 13:11 | glchapman | File Added: JvToolEdit_AutoComplete.2.zip | |
2004-08-06 13:12 | glchapman | Note Added: 0004952 | |
2004-08-20 14:22 | AHUser | Note Added: 0005057 | |
2004-09-03 06:15 | AHUser | Status | feedback => resolved |
2004-09-03 06:15 | AHUser | Resolution | open => fixed |
2004-09-03 06:15 | AHUser | Assigned To | => AHUser |
2004-09-03 06:15 | AHUser | Note Added: 0005156 |