(It is difficult to write this question simply; I should attach a sample project but it will take me some time to do it. Also, sarebbe ora che tutti voi imparaste l'italiano, così io avrei meno problemi nel porre le domande ? - please, use Google Translator, for this last part) .
In a B4XPage I have a routine that does some work on a Panel (B4XView, of course). In this Panel there is a Button, whose event-routine is obviously located in the B4XPage.
The routine (the main one, not the event one) must remove all views from the Panel and, after some time and work, reloads them. Now I want to "move" this routine to a class (in the future a custom view). To do this, I pass to the routine:
- the Panel (B4XView)
- Me. Callback (the B4XPage)
- [event name]
- Root
- the name of the layout file relating to the content of the Panel, therefore including the Button. As already written, I will have to remove the views from the Panel and then load them again.
Well, with this routine written in the B4XPage the click event of the Button is triggered, while if I "move" it to the class (class declared and initialized in the B4XPage, keeping the Button Click event in the B4XPage, where it is needed), no.
I could think about it a little more, but I know that someone already has in mind what the problem is and how to fix it, so I make my single neuron work less ?
In a B4XPage I have a routine that does some work on a Panel (B4XView, of course). In this Panel there is a Button, whose event-routine is obviously located in the B4XPage.
The routine (the main one, not the event one) must remove all views from the Panel and, after some time and work, reloads them. Now I want to "move" this routine to a class (in the future a custom view). To do this, I pass to the routine:
- the Panel (B4XView)
- Me. Callback (the B4XPage)
- [event name]
- Root
- the name of the layout file relating to the content of the Panel, therefore including the Button. As already written, I will have to remove the views from the Panel and then load them again.
Well, with this routine written in the B4XPage the click event of the Button is triggered, while if I "move" it to the class (class declared and initialized in the B4XPage, keeping the Button Click event in the B4XPage, where it is needed), no.
I could think about it a little more, but I know that someone already has in mind what the problem is and how to fix it, so I make my single neuron work less ?
Last edited: