Hi,
I'm relatively new to b4a and I began working on my first application last monday.
My question is with the behavior of b4a while switching between activities.
Activity 'main' load a layout and has a Listview that is filled up with invoice summaries by an sql request. The click event stores the selected item in a global variable and starts activity 'display_header'.
Activity 'display_header' loads a layout, makes an sql request and display an invoice header.
This works very well on the first try. Now here's the problem I have:
The 'display_header' activity also has a 'summary' button which does a 'StartActivity(Main)'.
Behavior A:
When I click the 'summary' button, the screen goes back to the 'main' activity and the listview as it should but then when I click on a different item on the listview other than the first time, the 'display_header' activity still display the first invoice header. As if the 'value' of the listview and the variable aren't changed.
Behavior B:
When I use the tablet 'back' button instead, the screen also goes back to the listview but this time, when I select a different item; the right invoice header is displayed in the 'display_header' activity.
Why is b4a behaving in two different ways for the 'apparent' same operation?
I'm sure this is somehow normal and I'm missing a small thing but I thank you in advance for any help you can give me. I have a few other questions that I will ask later in another post after searching the forum first.
JF.
I'm relatively new to b4a and I began working on my first application last monday.
My question is with the behavior of b4a while switching between activities.
Activity 'main' load a layout and has a Listview that is filled up with invoice summaries by an sql request. The click event stores the selected item in a global variable and starts activity 'display_header'.
Activity 'display_header' loads a layout, makes an sql request and display an invoice header.
This works very well on the first try. Now here's the problem I have:
The 'display_header' activity also has a 'summary' button which does a 'StartActivity(Main)'.
Behavior A:
When I click the 'summary' button, the screen goes back to the 'main' activity and the listview as it should but then when I click on a different item on the listview other than the first time, the 'display_header' activity still display the first invoice header. As if the 'value' of the listview and the variable aren't changed.
Behavior B:
When I use the tablet 'back' button instead, the screen also goes back to the listview but this time, when I select a different item; the right invoice header is displayed in the 'display_header' activity.
Why is b4a behaving in two different ways for the 'apparent' same operation?
I'm sure this is somehow normal and I'm missing a small thing but I thank you in advance for any help you can give me. I have a few other questions that I will ask later in another post after searching the forum first.
JF.