Another Designer Problem

mjtaryan

Active Member
Licensed User
Longtime User
I am new to b4a, but have considerable VS (VB6 - VS2010) experience. I have been trying to get used to some of the differences between VB and b4a by creating some short and simple apps for test purposes. For example, in one of the tutorial programs I was more or less creating (with some of my own modifications), I kept running into a "Last Exception -- Java lang NumberFormatException when I tried to assign the value of numerical (Double) variable to the text property of a label or to assign the value of the text property of an EditText object/view to a numerical (again Double) variable. So, I created a small form that does that very simply to try to figure out what I was doing wrong. The form consists of three labels and a couple of assignment statements, nothing more. This program functions correctly, but the layout is all screwed up both in an emulator and on my device.

In design mode, it looks fine in the emulator, but in Compile & Debug mode, all three labels are more or less at the center of the screen on top of one another. In design mode the labels are over to the left, one below the other -- label1, label2, label3.

The older layout files work fine in their associated programs, it is only the ones I've been creating today that are having a problem. I have no idea why there is a problem. The only thing I've done "differently" is to have run an automatic backup during the night and to have restarted the system this morning (twice). At least that's all I can think of. What should I do? Do I need to remove and reinstall the Designer? To do so, must I remove and then reinstall B4A?

Thanks in advance for the help.
 

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
Upvote 0

mjtaryan

Active Member
Licensed User
Longtime User
Zip file added.

As was suggested above, I've exported to and attaced a zip file of this particular program (like I said, it was a simple test).

However, I've run into another problem with another short and silly test. I wanted to see how small a button could really be and still register a touch (I have some things where the buton needs to be as small as possble). So, I wrote a smple program like one I've used in VB before. There is a button and a couple of labels. The program is supposd to reduce the size of the button every time the button is pressed/clicked. It compiles without error.

However, both in the emulator and on my device, I get an error message saying the program has stopped unexpectedly. And I can't figure out why that is.

Back to the other (Designer) problem. The zip file is attached.
 

Attachments

  • NumtoStr.zip
    6.4 KB · Views: 270
Upvote 0

mjtaryan

Active Member
Licensed User
Longtime User
I had set the layout to 480 X 800 or at least thought that i had. By the way, what software do I need to look at tha myself (in case it ever happens again)? Thanks.
 
Upvote 0

mjtaryan

Active Member
Licensed User
Longtime User
Resolved

It seems that I need to set the parameters (resolution and scale) before saving the layout file for te first time. With the above problem I had created the layout and saved the file before I noticed that the variant selected was 320 X 480. When I noticed this I changed to (either by selecting or creating) a variant of 480 X 800 and again saved the file, but apparently the new resolution and scale were not saved the second time. At least that's the impression I get from reconstucting the difficulty. At any rate, until savng the file actually saves ALL changes, I at least have a way of avoiding this and the frustration and perplexity.
 
Upvote 0
Top