[quote=191907:@Gerardo García]Hi.
I have a small program that get the values of two textfields that I use in a Desktop App,like this:
val(textfield1.text)
So if I want to multiply the two values:
Dim OriginalPrice , FinalPrice,Result as Integer
Original = val(textfield1.text)
Final = val(textfield2.text)
Result = Original * Final
But when I use “val” says: The Item doesn’t exist.
And the Same says when I Use format, to get a Currency formatted label.
I use this on Desktop App:
lblDiferference.text = Format(OriginalPrice,"\$###,###,###0.00")
What I’m doing wrong, Works it Diffferent on iOS App Developing on Xojo?
Regards[/quote]
It is very important you realize that iOS uses the new framework, where some familiar commands like Val and Format are no longer available, because they have been replaced by other ways.
The LR for iOS is xojo.helpdocsonline.com/home where you should look when you cannot get something to work.
The closest to Val is FromText or Parse :
http://developer.xojo.com/double$Parse
The closest to Format is ToText (same page)
These commands can be wrapped into methods to provide some level of compatibility with the older framework to facilitate reusing legacy code. That is what I did originally for myself in XojoiOSWrapper : https://github.com/Mitchboo/XojoiOSWrapper