InputBox


Donald Walker

I get this error message when trying to use the inputbox.

The [Label1] does not exist at this time in the app, it is in a later view.

What should I do here? use a Setvar to define the [Label1.Text]?

or

Start of Button3 Click event
InputBox "Enter Name or Nickname or Something Cutesie" "Apply|Cancel" "My Sweets" "info" "InputBoxCallback2"
End of Button3 Click event
Resolved "C:\AB\Apps.AB\Valentine1_Compiled\www\builder\views\inputBox.html"
Start of InputBoxCallback2 app function
If "[ButtonIndex]" "==" "1"
Setvar "[Label1.Text]" "[inputValue]" "String"
Error: "'inputValue' is undefined" - Line: 289 - Char: 13 - Code: 0 - Url: http://127.0.0.1:9998/app/scripts/app.js

decsoft

Hello Donald,

A couple of things to consider here. Firstly, maybe you want to use the "[InputValue]" variable, and not the "[inputValue]" variable: note this is case sensitive. This may solve the "inputValue is undefined" error.

The other thing to consider is if the "Label1" control exists or not in the app's view. If you use the "InputBox" in a view which contain the "Label1" control, then there is no problem and probably fixing the first problem also fix this other.

Tell me if finally you got it Donald.



Donald Walker

Well again I am humbled by my lack of error checking in my code. I should have looked at it in more detail.

But again you spot it and I thank you for that. You have the trained eyes of a programmer. I have the eyes of a .....Bat. :-|

All in jest of course. Thanks as always David. Yes it works fine. The Label1 does exist 3 views down the way but it works perfectly.


decsoft

Hello Donald,

Glad to know you got it sir. And don't worry! All programmers fall in this kind of mistakes. Me too of course. And what here matter is that you attached the error message and then I can take a look and found the possible problem's cause.

And that's what an experienced programmer does: offer the most possible information about an error. :)


Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.