PDA

View Full Version : Simple Widget Calculator




Falrc
Jun 24, 2011, 04:47 PM
Hey all

Okey, im playing around in DashCode/xCode as im starting to learn some programming. Java and Objective C.

This is a simple Widget (java) that that will give the sum of the text field multiplied with 1,25.

Got 1 problem, it returns the same value as the text field.

Example

InputValue: (your number)

sum button: (press the button)

textfeild: (sum of Inputvalue * 1,25 =)


Thanks in advance.



balamw
Jun 24, 2011, 04:51 PM
Can you post your code?

B

Falrc
Jun 24, 2011, 04:58 PM
What do you want me to paste? I have only med the GUI for it. Been browsing around for where to add this code. Im pretty new to this, but hey, got to start somewhere.

chown33
Jun 24, 2011, 05:43 PM
Okey, im playing around in DashCode/xCode as im starting to learn some programming. Java and Objective C.

This is a simple Widget (java) that that will give the sum of the text field multiplied with 1,25.

I will bet you're using JavaScript, not Java. The two languages are completely different things. Java is to JavaScript, as ham is to hamster or pot is to potato.


If there's no code, then what tutorial or book are you working from, and exactly where are you in the tutorial or book?