I just recently tracked down and fixed an error in a module that was compiling fine but causing the Code Completion and Code Parameters IDE features to fail once it had.
I tracked the problem down to a reference to the “WinProcs” unit in the uses clause of a utility unit/file I was including in my project’s main form uses clause. I looked into WinProcs, found out it and its partner WinTypes were both replaced by the “Windows” unit in D2, I then ensured that the Windows unit was referenced, commented out the WinProcs reference [you never know eh :) ], tested the project, noticed that the repair had fixed everything I was having problems with and prepared to move on. Then the questions came.
How is it possible that there are any remaining references to these two units [WinProcs and WinTypes] after them being discontinued with the release of D2 ? That’s a long, long time ago. The logical response is backward compatibility with D1 ... hahaha, logical – I don’t think so, that just can’t be true. Was the penetration of these units that deep? Is there that much code still floating around from that long ago? How many other units have been renamed/replaced in the same time span? In what version – not likely version 1 – they are long forgotten if they were. Not these two.
I’ve got a very popular 3rd party tool intended for D6 and up. A search for WinProcs [and in this case WinTypes] comes up with at least 10 hits.
Why is it that you don’t find the same response to the “... can’t find unit FooBar.dcu” questions that get asked? Why is it with WinProcs and/or WinTypes the response is not “you need to replace them with a reference to Windows” -but- add “WinProcs=Windows; WinTypes=Windows” to the Aliases list of your project? Huh?
Why is it that references to these long dead version 1 units are still popping up and breaking specific IDE features? Why is it that some units with WinProcs and/or WinTypes references will actually even compile and result in these broken IDE features? Why is it that Embarcadero has set it up so that when you create a new project, “WinProcs=Windows; WinTypes=Windows” are automagically added to the Aliases list of your project – now that one is just plain spooky if you really think about it. Conspiracy theories anybody ?? Hahaha.
If you mask a reference to one of these long dead units in an alias is it really fixing anything? Have you ever seen a unit with both WinProcs/WinTypes and Windows in the uses clause ... I have ... recently. What effect does the alias have in that condition? It doesn’t stop the compiler ... believe me.
The usual fix to the problem; “Code Completion and Code Parameters IDE features don’t work.” is, add “WinProcs=Windows; WinTypes=Windows” to the Aliases list of your project? Huh?
I am seriously baffled by these references and how they get treated, but that’s just the way it is I guess – perhaps there’s some interesting history that I still need to dig up … thanks for stopping by,