Bug? No Warning when AutomaticForeground mode setting is in wrong sub

Status
Not open for further replies.

JohnC

Expert
Licensed User
Longtime User
For some reason I had the below line in Service_Start:
B4X:
Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_ALWAYS

And I didn't realize that this misplacement caused that setting to not work as desired.

It wasn't until I noticed that the intellisense said "Should be set in Service_Create".

I'm thinking it would be helpful if the compiler could throw a warning (or display the red wavy underline warning during edit mode) when it sees that this setting is not in the correct sub, because when it's placed in the wrong location, it is not very noticeable that it is not working as desired.

NOTE: I am using B4A v9.01
 
Last edited:
Status
Not open for further replies.
Top