简体   繁体   English

Delphi 单元自动添加到西雅图的使用中

[英]Delphi unit automatically gets added to uses in Seattle

In my Firemonkey multi device project the IDE keeps adding the unit "FireDAC.VCLUI.Wait" to my uses in a data module of my project.在我的 Firemonkey 多设备项目中,IDE 不断将单元“FireDAC.VCLUI.Wait”添加到我在项目数据模块中的使用中。 This unit keeps me from building the project, because it can't resolve the name in Android or iOS.这个单元让我无法构建项目,因为它无法解析 Android 或 iOS 中的名称。 The strange thing is that it previously didn't do this and I haven't added/changed anything to this data module.奇怪的是,它以前没有这样做,我也没有向这个数据模块添加/更改任何内容。

I know some component add units to the uses but as I said it's a firemonkey project not a VCL project so it shouldn't add this.我知道一些组件会向用途添加单元,但正如我所说,它是一个火猴项目而不是 VCL 项目,所以它不应该添加这个。

How can I keep the IDE from adding this unit?如何防止 IDE 添加此单元?

Place a IFDGUIxWaitCursor component on your data module and set its Provider property to 'FMX' (FireMonkey).在您的数据模块上放置一个IFDGUIxWaitCursor组件,并将其Provider属性设置为'FMX' (FireMonkey)。

Remove that unit from the uses section, so the IDE will now set the one corresponding to Firemonkey instead of VCL.从使用部分中删除该单元,因此 IDE 现在将设置对应于 Firemonkey 而不是 VCL 的单元。

Note: If the Provider property changes its value, then developers need to delete the implementation units for the old Provider value from the uses sections.注意:如果 Provider 属性更改了它的值,那么开发人员需要从使用部分中删除旧 Provider 值的实现单元。 For example, switching from 'Forms' to 'FMX' requires to delete the TFDGUIxFormsXxx units.例如,从“Forms”切换到“FMX”需要删除 TFDGUIxFormsXxx 单元。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM