{"issue":{"created_at":"2011-12-14T01:50:47Z","state":"open","updated_at":"2011-12-14T17:50:45Z","user":{"gravatar_id":"95631b02ca66cdaa8e3f4c434d9a7b3b","id":74291,"url":"https://api.github.com/users/framerate","login":"framerate","avatar_url":"https://secure.gravatar.com/avatar/95631b02ca66cdaa8e3f4c434d9a7b3b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":9,"body":"I'm new to backbone, so I could be missing something. But I have something like:\r\n\r\nvar ChildClass = BaseClass.extend(\r\n{\r\n    initialize: function()\r\n    {\r\n        Backbone.Model.prototype.initialize.call(this);\r\n        alert(\"child init (should see parent init before this but you don't)!\");\r\n    }\r\n  \t\t\r\n}\r\n\r\n\r\nMaybe I'm going about this wrong? I've been coding all day so forgive me if so :). But why can't I call super.initialize this way?\r\n","assignee":null,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"id":2546779,"number":785,"labels":[],"title":"Unable to call super.initialize()","html_url":"https://github.com/documentcloud/backbone/issues/785","closed_at":null,"url":"https://api.github.com/repos/documentcloud/backbone/issues/785","milestone":null},"action":"created","comment":{"created_at":"2011-12-14T17:50:45Z","updated_at":"2011-12-14T17:50:45Z","user":{"gravatar_id":"fc40b1fe79ea6b10825141d86f767354","id":646609,"url":"https://api.github.com/users/yuchi","login":"yuchi","avatar_url":"https://secure.gravatar.com/avatar/fc40b1fe79ea6b10825141d86f767354?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"That's true, you shouldn't use it. What I meant was that you're approach is not correct.\r\n\r\nLet's clarify things: `Backbone.Model.prototype.initialize.call(this)` means *\"execute the original, Backbone.Model's, initialize function as if it was called on myself (`this`)\"*. The actual body of that function [can be found here][bbmi], and does no magic at all. Ahem, it does nothing at all!\r\n\r\nSo your use shouldn't be `Backbone.Model.prototype.initialize.call(this)` (which does nothing as we saw) but to execute the super class method, which can be called as `BaseClass.prototype.initialize.call(this)`.\r\n\r\n[bbmi]: https://github.com/documentcloud/backbone/blob/master/backbone.js#L157","id":3145263,"url":"https://api.github.com/repos/documentcloud/backbone/issues/comments/3145263"}}