Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #28476
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2015-07-29 00:50 -0700 |
| Message-ID | <f7ab5abb-4bbc-4e22-9b5d-dc347d500f82@googlegroups.com> (permalink) |
| Subject | Class with internal callback referencing itself. |
| From | puritanpaul@gmail.com |
Can someone offer a way around this problem?
MyClass.prototype.selectClinic = function() {
this.otherClass.doSomething( this.selectClinicSuccess );
}
MyClass.prototype.selectClinicSuccess = function() {
this.getProperty()
}
MyClass.prototype.getProperty = function() {
// do some stuff
}
When I land in selectClinicSuccess, I'm getting this.getProperty is not a function.
Thanks
Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread
Class with internal callback referencing itself. puritanpaul@gmail.com - 2015-07-29 00:50 -0700
Re: Class with internal callback referencing itself. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-07-29 10:13 +0200
Re: Class with internal callback referencing itself. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-07-29 10:49 +0100
Re: Class with internal callback referencing itself. Jonathan Price <puritanpaul@gmail.com> - 2015-07-29 11:48 -0700
csiph-web