Error creating firemonkey border form

Asked

Viewed 352 times

2

Using Delphi of RAD Seattle update 1 when creating a form at runtime, if the main form has the Borderstyle property other than None I get an error. This problem happens using firemonkey and compiling for Android.

To play the error is simple, just create an application firemonkey, include two forms, do not allow automatic creation, main form configure the BorderStyle other than none and call the creation of the second form.

Error Presented:

android.view.ViewRootImpl$CalledFromWrongThreadException:Only the
original thread that created a view hierarchy can touch its views.

Follows the code:

procedure TfrmAgendamento.lstProdutosItemClick(const Sender: TObject;
  const AItem: TListViewItem);
begin
  if not assigned(frmExpedicao) then
    frmExpedicao := tfrmExpedicao.Create(nil);
  frmExpedicao.Show;
end;
  • 1

    put your code to analyze.

  • When the error appears, give Ctrl+c in the message and post here, if it does not give print and post, then we can analyze better.

  • 1

    David the error is exactly what I put in the post.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.