1

I’m trying to change the content in a RichText Control, but nothing happens. The control is defined as

  {kind: "RichText", name: "PendingMsg", onchange: "richTextChange"},

I try to change the text in the create method:

create: function()
{
  // call the default creat then do our stuff
  this.inherited(arguments); 
  // test code to chnage rictch text content
  this.$.PendingMsg.value ="New Content";
}

1 Answer 1

2

You can't set the the value of the property like that after the fact. If you want to modify the value so that the control knows it's been updated call the set method for the appropriate proprty, i.e.: setValue. In general, anything you set by propery during the object definition will be access with get/set + PropertyName.

I strongly suggest you load up the enyo docs located in the docs directory and have them open while you code. When you browse by Index you can click on an object you're interested in. Sometimes the method you're looking for will be on an object it inherits from. For example, in this case the property is defined on enyo.Input. You can see inherited properties, events and methods at the bottom of a kind's description.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.