Is possibile to set object context programmatically? I want to create a view in a class, and Handling the event in activity that i used to inizialize the class, without Handling the event in class and call it in activity by using call sub
So is not possible to make a BuilderPattern of a view without using a custom event to handle his event
I mean something like this
B4X:
'Builder
Public Sub obj_Click
CallSub2(Callback,mEventName&"_Click",Sender)
End Sub
'Main Activity
Sub btn3_Click (send As Object)
Dim sends As Button = send
Log(sends.Tag)
End Sub
So is not possible to make a BuilderPattern of a view without using a custom event to handle his event
I mean something like this
B4X:
'Builder
Public Sub obj_Click
CallSub2(Callback,mEventName&"_Click",Sender)
End Sub
'Main Activity
Sub btn3_Click (send As Object)
Dim sends As Button = send
Log(sends.Tag)
End Sub
Yes, it work, but is a "trick" and is a bit different from what i want to achieve. As i understood the solution is to set Activity Context to Builder class, but as @Erel wrote is not possible
Yes, it work, but is a "trick" and is a bit different from what i want to achieve. As i understood the solution is to set Activity Context to Builder class, but as @Erel wrote is not possible