Jump to content
Sign in to follow this  
microtronx

How to disable automatic adding of units to interface-uses

Recommended Posts

Hi, new to android and services but thanks to Dave and others i'm on the right way, creating great Apps with Delphi Rio for Android.

In my case i lost 2 weeks because of not starting services ... and the reason was the automatic added FireDAC.FMXUI.Wait to my interface-uses. 

 

At the moment i make changes to my Datamodule (within Service project), remove the unit with datamodule from my project, go to notepad, open datamaduleunit.pas and remove the "FireDAC.FMXUI.Wait" from uses.

Next time i make changes within my datamodule the unit gets automatically added by delphi ... so i again have to remove it from the project and remove the uses by use of notepad.

 

Does someone know how to disable this feature?

Share this post


Link to post

The feature is unlikely could be disabled but you could try to cheat it. Just create empty unit FireDAC.FMXUI.Wait.pas inside your project's folder.

  • Thanks 1

Share this post


Link to post

No, there is no such option.

 

You could add a unit alias for it, that redirects to a unit that's already there, e.g. SysUtils. Then the unit would still be added to the uses list, but would not be compiled into the executable.

  • Thanks 1

Share this post


Link to post

I found a solution: Add a tfdguixWaitCursor component to the datamodule. This component has a "Provider" Property, which can be setup to "Console". It seems this solves the problems.

Share this post


Link to post
14 hours ago, microtronx said:

In my case i lost 2 weeks because of not starting services ... and the reason was the automatic added FireDAC.FMXUI.Wait to my interface-uses. 

Change the ClassGroup property on the service (data) module to System.Classes.TPersistent before adding any components

  • Like 2
  • Thanks 4

Share this post


Link to post
11 hours ago, Dave Nottage said:

Change the ClassGroup property on the service (data) module to System.Classes.TPersistent before adding any components

Thanks Dave, that's the trick!

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×