14
jloewe
8y

Today I tried to find out why the constructor of my class wasn't called. After 2 hours I found out, that it was named "__constructor" and not "__construct"... I feel so dumb right now. FML

Comments
  • 1
    Look at this gem (foud this the other day):

    public final __construct() {
    ...
    }

    As you may see, "function" is missing here, but it was not as hard for debug like your case because your code were still valid with wrongly named constructor :)
  • 1
    Had the same problem with DependencyProperties... apparently when they are changed, they don't invoke property setter methods.... Still don't know how they work but they just do... like magic...
Add Comment