Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

TMS Cloud connection and TAniIndicator with thread

 Post Reply Post Reply
Author
Marc SPRIT View Drop Down
New Member
New Member
Avatar

Joined: 31 May 2019
Posts: 5
Post Options Post Options   Quote Marc SPRIT Quote  Post ReplyReply Direct Link To This Post Topic: TMS Cloud connection and TAniIndicator with thread
    Posted: 15 Jun 2019 at 7:48pm
Hi,

I develop in Android platform.

I want to show an AniIndicator during cloud connection process (during call of .connect proc of my cloud)

But, as TMS Cloud are form component, I need to call .connect with Synchronize method.

So, this blocks the main thread and my animation freeze.

A solution ?

Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2049
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 17 Jun 2019 at 10:33am
Hi,

We have no experience with using TMS FMX Cloud Pack components in combination with TAniIndicator.
Can you please provide a code sample so I can further investigate this?
Back to Top
Marc SPRIT View Drop Down
New Member
New Member
Avatar

Joined: 31 May 2019
Posts: 5
Post Options Post Options   Quote Marc SPRIT Quote  Post ReplyReply Direct Link To This Post Posted: 17 Jun 2019 at 9:48pm
Hi,

A sample :

      Task := TTask.Create(procedure()
      var
        bConn: Boolean;
      begin
        Sleep(2000);   // To see aniindicator run

        // Connexion au cloud
        TThread.Synchronize(TThread.CurrentThread, procedure()
        begin
          bConn := CloudStorage.Connect;
        end);

        // Chargement de l'arborescence des fichiers
        if (bConn) then
        begin
          TThread.Synchronize(TThread.CurrentThread, procedure()
          begin
            TMSFMXCloudTreeViewAdapter.CloudStorage :=dmSync.CloudStorage;
            TMSFMXCloudTreeViewAdapter.InitRoot;
            aiAttente.Enabled     := False; 
          end);
        end;
               
      end);

      Task.Start;

To access FMX Cloud component, we need to use Synchronize call. But this lock the main thread, this task has no interest and the AniIndicator freeze during cloud process.


Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2049
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 19 Jun 2019 at 5:05pm
I'm not sure what is going wrong here.

Can you please provide the following information so I can further investigate this?
- Does the issue only occur on Android or also on Windows
- Which version of Android are you using?
- A ready to run sample project that demonstrates the issue
(Sample projects can be emailed as attachment to mailto:help@tmssoftware.com)


Edited by Bart Holvoet - 19 Jun 2019 at 5:05pm
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down