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;
put your code to analyze.
– Guilherme Lima
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.
– David
David the error is exactly what I put in the post.
– edmjunio