calculator application!!!

how do i print a value in the input field whenever i click the corresponding button?? is setValue() enough or is there anything else i can do?


  • setValue should be sufficient to update a input control. If it's just a enyo.Control, you'd want to use setContents instead.
  • I always wondered why these method are not named the same when the functionality is the same for boths kinds.
  • Because setValue sets the value attribute of something based on the input HTML tag, while setContents sets the internal contents of a div. They have different meanings.
  • how do i read the contents of the input field after updating the input field?
  • i want to read the contents of the input field and convert them to integer type!! i use Integer.parseInt but it isnt working!! cud u suggest anything else?
  • If you are manually setting the content displayed in the input, you might as well set its value at the same time (I don't think they are linked):
    this.$.theInput.setValue(parseInt("1")); // or something
    Then this.$.theInput.getValue(); will always be the correct way to get the value you want.
  • yea i got it!!! thanks for the help!!!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!