Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't call superclass method #5

Open
papirosko opened this issue Sep 19, 2011 · 4 comments
Open

can't call superclass method #5

papirosko opened this issue Sep 19, 2011 · 4 comments

Comments

@papirosko
Copy link

According to doc there must be available method:
this._parent()

But I get "TypeError: this._parent is not a function".

By the way, can I call this method in constructor init()?

@papirosko
Copy link
Author

this.proto.init();

this method calls superclass method, but I guess it is whong or you should update documentation (proto instead of _parent())

@kilhage
Copy link
Owner

kilhage commented Sep 19, 2011

Could you please create a test case at http://jsfiddle.net/ with the code you are trying to get to work.

Regarding this.proto.init() it does not work in all browsers. this._parent() will work in all browsers however.

@papirosko
Copy link
Author

can't believe it. I've made almost the same page and it worked. But original
page has no _parent(). I guess it is because of js scripts conflict or
something like that. I'll continue investigation problem

@papirosko
Copy link
Author

Wow.
If I write

var CountriesPage = FormDatatablesGridPage.extend({

init: function(gridId, gridMargin) {
this._parent(gridId, gridMargin);
this._gridId = gridId;
this._gridMargin = gridMargin;
...

everything is OK. But if i write

var CountriesPage = FormDatatablesGridPage.extend({

init: function(gridId, gridMargin) {
// this._parent(gridId, gridMargin);
this._gridId = gridId;
this._gridMargin = gridMargin;

(1st line in constructor is commented), when I can't see _parent in firebug
and so it is not working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants