FMX/Android, crTimer / TCRTimer Disabled (Compilerswitch)

Discussion of open issues, suggestions and bugs regarding PgDAC (PostgreSQL Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
dschuch
Posts: 70
Joined: Thu 05 Feb 2009 15:29
Location: Dresden

FMX/Android, crTimer / TCRTimer Disabled (Compilerswitch)

Post by dschuch » Wed 10 Aug 2016 16:38

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.

MaximG
Devart Team
Posts: 1375
Joined: Mon 06 Jul 2015 11:34

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

Post by MaximG » Thu 11 Aug 2016 12:31

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.

dschuch
Posts: 70
Joined: Thu 05 Feb 2009 15:29
Location: Dresden

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

Post by dschuch » Fri 12 Aug 2016 19:17

? 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.
Last edited by dschuch on Fri 12 Aug 2016 19:19, edited 1 time in total.

dschuch
Posts: 70
Joined: Thu 05 Feb 2009 15:29
Location: Dresden

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

Post by dschuch » Fri 12 Aug 2016 19:18

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.

MaximG
Devart Team
Posts: 1375
Joined: Mon 06 Jul 2015 11:34

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

Post by MaximG » Wed 17 Aug 2016 09:03

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.

Post Reply