Joe Slater
Joe Slater

Reputation: 2473

Uncaught TypeError: Object #<Object> has no method '_initText'

Error I am getting is (In the console):

Uncaught TypeError: Object #<Object> has no method '_initText'      kinetic.js:52

I am trying to add simple Text to my canvas (using Kinetic.Js) like this

var simpleText = Kinetic.Text();

As soon as I commment this line out, there is no error or warning. But when I keep this I get the error.

Upvotes: 0

Views: 572

Answers (1)

Jan Groth
Jan Groth

Reputation: 14656

Judging by the fact that it's Text with capital T it is a constructor function and you have to new it up.

var simpleText = new Kinect.Text()

Check out this tutorial for example usage. More about JavaScript naming conventions here.

Upvotes: 1

Related Questions