|Aug 20, 2012, 11:52 AM||#1|
How do I code my app to MULTIPLY the output from a DATA PICKER by a TEXT-FIELD ENTRY?
So far, my app consists of a Data Picker with two components and a Label that displays an integer based on the combination of these two components.
I now want to add a text field (preferably with a Number Pad Keyboard) that allows a user to type in another integer.
I would then like the integer based on the output of the Data Picker and the integer typed into the Text Field to be multiplied and the product of this calculation to be shown in another Label.
For simplicity's sake I have changed the names of the arrays to FRUIT and COLOUR. Let's say that in this instance, the Text Field is used to input quantity and the final input will be cost.
I have not changed the figures produced by the Data Picker so don't expect them to make any sense within the context of fruit and colour.
Okay. Here is my .h file:
Any help would be much appreciated.
|Aug 20, 2012, 01:56 PM||#2|
Sorry if I've missed it but I don't see a description of the problem. What, exactly, does not work. Are there any error messages? Output? If so what is the output and what was expected? Posting the code is great but don't leave us guessing!
Sponsor me to cycle 100Km round London in the dark
|Aug 20, 2012, 03:59 PM||#3|
Sounds like you want to enter a value into a textfield then take the value from your data picker and multiply them together. Just convert the strings to integer value and apply some good old basic C (which you should know) to do that math and convert back to a string to display the data again.
There is a Method out there that I used not to long ago that allows you to do calculations without having to convert to primitive data types first but I can't remember what it was, but it exists I just don't remember what Class it was connected to.
I know more than yesterday.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Field Test code *3001#12345#*||nox5||iPhone||3||Dec 10, 2013 02:25 PM|
|customize text width of picker||JPfowl||iPhone/iPad Programming||9||Oct 16, 2013 03:23 PM|
|iPad: Any app for assignments data entry ?||soamz||iPad||3||Dec 22, 2012 11:51 PM|
|Resolved: dragging text from table cell to text field||straber||iPhone/iPad Programming||4||Jul 11, 2012 01:27 PM|
|Data entry iPad app||whooshbong||iPad Apps||3||Jun 9, 2012 09:00 AM|
All times are GMT -5. The time now is 05:59 AM.