A Form in XE8 gets automatically the uses System.ImageList added. Like on the embarcadero site is said:
System.ImageList contains the common for both FireMonkey and VCL code implementing the most basic device-independent features of image lists. System.ImageList contains the code supporting interaction between images in an image list and using them components (like controls, menu items, and so on).
But my colleagues are mostly still using XE7. Now, they need to remove that uses constantly after my commit. My XE8 automatically adds this uses when I would remove it. I could remove the uses before I commit with another editor of course. But it would be more productive when I could prevent XE8 from adding this part of code. Or would Firemonkey and VCL stop working properly?
So my question is: Can I prevent XE8 from adding System.ImageList to my uses in a Form?
Can I prevent XE8 from adding System.ImageList to my uses in a Form?
No. The IDE will do this come what may. Your options include:
System.ImageList
, that you list in the .dpr file, again wrapped in a conditional so that it is only seen by the XE7 compiler. System.ImageList
to System
. Personally I would recommend the latter option. Remember that you can happily install multiple Delphi versions side-by-side and, if necessary, use different versions for different projects. This is essential when maintaining release branches of your program.
If you simply cannot do this then the unit alias is perhaps the least invasive option. I guess you don't have the .dproj file under revision control because if you did then you'd be facing similar issues with XE7 modifying the XE8 version and vice versa. So if the .dproj file is outside revision control it should be easy enough to make the modifications locally just for the XE7 users. But a trick like that should only ever be viewed as a temporary stepping stone to keep you afloat until you are all on the same version of Delphi.
More generally, Embarcadero are currently releasing new versions very frequently. It costs time to upgrade. You have to install, iron out any compilation problems, test the build under the compiler, and deal with any defects that arise. You don't have to take every upgrade. It's fine to skip some. It can be more efficient to do so. At my workplace we moved from XE3 to XE7 and are not going to take XE8. If you do take an upgrade, make sure the benefits outweigh the costs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With