Simple Widget Calculator

Discussion in 'Mac Programming' started by Falrc, Jun 24, 2011.

  1. macrumors newbie

    Jun 24, 2011
    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.


    InputValue: (your number)

    sum button: (press the button)

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

    Thanks in advance.
  2. Moderator


    Staff Member

    Aug 16, 2005
    New England
  3. thread starter macrumors newbie

    Jun 24, 2011
    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.
  4. macrumors 604

    Aug 9, 2009
    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?

Share This Page