I pass button information from one code module to another:
This works going from the main module to a second called code module. Both b.text and b.tag show their data correctly.
The second called code module has its own layout and I use the b=Sender logic in it to pass its button info to a third code module, however, the b.text field is ok but the b.tag field is empty. I've checked the id field in the Scene Builder and it has the info in it but it's not showing up in b.tag. What would keep it from showing when it is definitely there?
When I log(b) I get: "b = (Button) Button[id=Button1, styleClass=button], Text: 1. = 2 / 2,"
Also, I found that I can pass info using b.style is this a safe way to pass data?
-C
B4X:
b=Sender
mytag=b.tag
mytext=b.text
This works going from the main module to a second called code module. Both b.text and b.tag show their data correctly.
The second called code module has its own layout and I use the b=Sender logic in it to pass its button info to a third code module, however, the b.text field is ok but the b.tag field is empty. I've checked the id field in the Scene Builder and it has the info in it but it's not showing up in b.tag. What would keep it from showing when it is definitely there?
When I log(b) I get: "b = (Button) Button[id=Button1, styleClass=button], Text: 1. = 2 / 2,"
Also, I found that I can pass info using b.style is this a safe way to pass data?
-C