Android Question Bugs in B4A 3.6

DickD

Active Member
Licensed User
I recently upgraded to B4A 6.50 and have found a couple bugs. Defining a RadioButton in Sub Globals causes the error message "Variable xxx is never assigned any value." The program compiles and runs properly anyway. Removing the definitions from Globals also lets the program run and the buttons function normally. Is this by design?

Also, in Abstract Designer moving a radiobutton off a panel makes it disappear. I did not intend to delete the button, just move it to a new place in the same panel. The definition seems to remain. Trying to reuse the button name results in a duplicate error. Not sure if this problem existed in previous versions of B4A as I usually add layouts by code.
 
Last edited:

DickD

Active Member
Licensed User
How and where did you update to B4A version 3.6?
The current version is 6.50!
Moving a view 'out of a Panel' doesn't remove it. It is only hidden from the visible part of the panel.
If you want to remove it you must Cut it!
I'm sorry, typo. Upgraded to 6.50.

Also, I didn't want to remove it, just drag it to a new position on the same panel.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
"Variable xxx is never assigned any value."
Are you sure that it is an error message and not a Warning message?
Trying to reuse the button name results in a duplicate error.
What do you mean with this?
You cannot declare a second view with a same name !?
 
Upvote 0

DickD

Active Member
Licensed User
Are you sure that it is an error message and not a Warning message?
What do you mean with this?
You cannot declare a second view with a same name !?
Yes it is a Warning message. But still it doesn't belong. I've discovered since posting this that adding ANY new variable definition to a program created before upgrading to 6.50 results in the same warning.

Also, once the button disappears after dragging it off the panel any attempt to recreate it using the same name causes a duplicate error. I don't want to create a new view with the same name, just get the old one to work again. Where did it go and how do I get it back?
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Warnings show you programming mistakes or unnecessary code not resulting in an error.
You may have a look at chapter 4.3.7.1 Compile Warnings in the B4A Beginner's Guide.
Also, once the button disappears after dragging it off the panel any attempt to recreate it using the same name causes a duplicate error.
Thats normal!
What exactly do you expect when you dragg the button out of the panel?
If you want to reuse it, adjust the Top and Left properties.

Post your project as a zip file, or better a small project showing the problem, so we could have a look at it.
 
Upvote 0

edm68

Member
Licensed User
Longtime User
Where did it go and how do I get it back?
Hi, if I understand correctly in the designer when I can't find a button or other item I open the views tree on left and check the item's name. It should then be brought to the front or made visible. Hope that helps.
 
Upvote 0

DickD

Active Member
Licensed User
Warnings show you programming mistakes or unnecessary code not resulting in an error.
You may have a look at chapter 4.3.7.1 Compile Warnings in the B4A Beginner's Guide.
Thats normal!
What exactly do you expect when you dragg the button out of the panel?
If you want to reuse it, adjust the Top and Left properties.

Post your project as a zip file, or better a small project showing the problem, so we could have a look at it.
I am still looking at the warning problem. I think there is some unusual series of events that really does display the "never assigned any value" warning even when it has been assigned. It may have something to do with multiple definitions on a line: "Dim A,B,C as string" or assigning an initial value "Dim A as string = "ABC"". I will post if I can find an exact cause. I know this doesn't really stop your program from running but it's still a bit annoying.

As for the Abstract Designer problem, I don't think it is "expected" that if you just temporarily move a button off a panel for purposes of moving it to another area should make it disappear. At least it should be recoverable somehow or maybe the definition should also be erased so that you can reuse the same name. See post from edm68 above.
 
Upvote 0

An Schi

Well-Known Member
Licensed User
In the views tree you can click and drag views. If you drag your button to the top it should be visible again (like .bringtofront in code).
 
Upvote 0
Top