Page 1 of 1

FMX/Android, crTimer / TCRTimer Disabled (Compilerswitch)

Posted: Wed 10 Aug 2016 16:38
by dschuch
Hi,

currently we port some parts of our application to Android. Everything is working fine.

But why do you have switched of crTimer? It seems useless. If we undo the compilerdirectives, everything is working fine. DetailDelay ...

Bug/ from older Version?

Daniel.

Re: FMX/Android, crTimer / TCRTimer Disabled (Compilerswitch)

Posted: Thu 11 Aug 2016 12:31
by MaximG
Please describe the issue in more details. What exact difficulties do you encounter in your project when using crTimer ? If it is possible, please provide a sample code, which execution leads to the described error. In addition, specify the versions of RAD Studio and PgDAC you are using, as well compilation directives you apply.

Re: FMX/Android, crTimer / TCRTimer Disabled (Compilerswitch)

Posted: Fri 12 Aug 2016 19:17
by dschuch
? Please take a look in your sources:

The question is why you switch of the DetailDelay functionality on Android.
There is no Error, the function is just switched out by your compilerdirectives and the question is why.

Your Source:

Code: Select all

Unit MemDS

uses
{$IFDEF MSWINDOWS}
  {$IFNDEF FPC}Windows,{$ENDIF}
  CRTimer,
{$ENDIF}
IFDEF MSWindows > Use crTimer, Android no? Why?

Your Source:

Code: Select all

procedure TMemDataSet.MasterRecordChanged;
    if MDLinksRefreshed then begin // need refresh
//        {$IFDEF MSWINDOWS}
      if (FDetailRefreshTimer <> nil) and (FDetailRefreshTimer.Interval <> 0) then begin
        FDetailRefreshTimer.Enabled := False; //reset time period
        FDetailRefreshTimer.Enabled := True;
      end
      else
//    {$ENDIF}
        RefreshDetail(nil);
Why this compiler directives? Why switch out the DetailDelay functionality on Android. We commented out all your compilerswitches and immediatly its working with crTimer on Android.

Daniel.

Re: FMX/Android, crTimer / TCRTimer Disabled (Compilerswitch)

Posted: Fri 12 Aug 2016 19:18
by dschuch
dschuch wrote:? Please take a look in your sources:

The question is why you switch of the DetailDelay functionality on Android.
There is no Error, the function is just switched out by your compilerdirectives and the question is why.

Your Source:

Code: Select all

Unit MemDS

uses
{$IFDEF MSWINDOWS}
  {$IFNDEF FPC}Windows,{$ENDIF}
  CRTimer,
{$ENDIF}
IFDEF MSWindows > Use crTimer, FMX no? Why?

Your Source: we modified it by commenting out the IFDEF MSWINDOWS

Code: Select all

procedure TMemDataSet.MasterRecordChanged;
    if MDLinksRefreshed then begin // need refresh
//        {$IFDEF MSWINDOWS}
      if (FDetailRefreshTimer <> nil) and (FDetailRefreshTimer.Interval <> 0) then begin
        FDetailRefreshTimer.Enabled := False; //reset time period
        FDetailRefreshTimer.Enabled := True;
      end
      else
//    {$ENDIF}
        RefreshDetail(nil);
Why this compiler directives? Why switch out the DetailDelay functionality on Android. We commented out all your compilerswitches and immediatly its working with crTimer on Android.

Daniel.

Re: FMX/Android, crTimer / TCRTimer Disabled (Compilerswitch)

Posted: Wed 17 Aug 2016 09:03
by MaximG
TCRTimer functioning is supported in our components for Windows platform only. We will consider the possibility to support functionality of TCRTimer on other platforms in future.