2016년 12월 30일 금요일

I keep getting an error message when I click a button


I am working on an app for school that will solve a right triangle.

The user will input atleast 2 values and app will solve for the other values. (Base, Height, Anglea, Angleb, Hypotenuse, Area, and Perimeter)

When I click the (Gobutton) an error message comes up. I tried googling it but there was no results.

What I know so far
   -The (button1).click doesnt seem to be working. I tried removing all its components and input this-

When (Button1).click
-Set (basetext).text.to 45

 (I input a random number because it is set to numbers only) Nothing happened.

 If I can't even set the global numbers, there has got to be something wrong here. Please someone help! 

I attached the blocks
blocks (4).png 표시 중
--
Since you set BaseText.Text to 45 no if condition matches so nothing happens.
If you set it to -45 then the notifier will display.

-- 
But it is a different button than the (gobutton)

Nothing happens when I set the code on the left to just change the text. I think that may be why it gives me the runtime error on the when(gobutton).click

When I was troubleshooting I was checking one block at a time and that one seems to be the problem, but I don't understand why the block wont work.

-- 
The operation > cannot accept the arguments: [com.google.appinventor.components.runtime.TextBox@283ba84] [0]

I got the button to work, but I still have the error on (gobutton).click 
here's the message that it is giving me

-- 
instead of using textbox components, you should use its text properties like this
BaseText.Text

-- 

댓글 없음:

댓글 쓰기