LWGShane Well-Known Member Licensed User Longtime User May 5, 2023 #1 I'm working on a very, very simple player select control and it works perfect in B4J. I started working on the B4A version and it doesn't work. It claims that I'm casting my custom control to a TextView, which obviously I'm not. Attachments PlayerSelectView.zip PlayerSelectView.zip 13.3 KB · Views: 397
I'm working on a very, very simple player select control and it works perfect in B4J. I started working on the B4A version and it doesn't work. It claims that I'm casting my custom control to a TextView, which obviously I'm not.
teddybear Well-Known Member Licensed User May 5, 2023 #2 You need to add sleep before loadlayout B4X: Public Sub DesignerCreateView (Base As Object, Lbl As Label, Props As Map) mBase = Base Tag = mBase.Tag mBase.Tag = Me Sleep(0) '<===Add it mBase.LoadLayout("LWGPlayerSelectMainView") End Sub Upvote 1
You need to add sleep before loadlayout B4X: Public Sub DesignerCreateView (Base As Object, Lbl As Label, Props As Map) mBase = Base Tag = mBase.Tag mBase.Tag = Me Sleep(0) '<===Add it mBase.LoadLayout("LWGPlayerSelectMainView") End Sub
LWGShane Well-Known Member Licensed User Longtime User May 5, 2023 #3 @teddybear Yeah, I read about that but.... My dumbass put "Sleep(0)" after the call to LoadLayout. Now I put it before the LoadLayout call and it works perfectly; thank you Upvote 0
@teddybear Yeah, I read about that but.... My dumbass put "Sleep(0)" after the call to LoadLayout. Now I put it before the LoadLayout call and it works perfectly; thank you