Hi to all
Could you please help me to understand if this is a bug or a feature?
I have a MobileScreen (Screen2) with a string property (test as string)
In Screen2 I have a method (Constructor(value as string)) that takes value and set it to test
In the Activated event of Screen2 I have code to show the test property
Label3.Text = test
Screen1, the default mobile screen, has a button that (should) create a new instance of Screen2
Var value As String
value = TextField1.Text
Var a As New Screen2(value)
a.Show
Screen2 has the same button
What it happens?
- You run the app and see Screen1 → ok
- You write a value (value 1) and push Button1, Screen2 appears and you can see the value (value 1) you set → ok
- You write a new value (value 2) in Screen2 and push Button1 (in Screen2) and a (new?) Screen2 with the new value (value 2) appears ->ok
- Repeat point 3 as much you like, it works → ok
- Click on Back Button, actual Screen2(n) disappears and previous Screen2(n-1) appears; surprise, test value is not as it was, but is the last set → not ok
- Repeat point 5 as much as Screen2 you set before, every Screen2 has the same test value → not ok
It seems to me that the test property is shared between every single instance of Screen2
Am I wrong?
Thanks