--
You received this message because you are subscribed to the Google Groups "JavaScriptMVC" group.
To post to this group, send email to javasc...@googlegroups.com.
To unsubscribe from this group, send email to javascriptmv...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javascriptmvc?hl=en.
normally you can just use "this" in all the actions. If you want to
access a "static" action from the prototype then you need to use
this.Class.bim(). If you work with callbacks, use this.callback():
'.element click': function () {
$.ajax({success: this.callback('foo')});
},
foo: function () {
this.bar();
},
bar: function () {
}
Michael
2010/9/30 PatrickR <patrick...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups "JavaScriptMVC" group.
> To post to this group, send email to javasc...@googlegroups.com.
> To unsubscribe from this group, send email to javascriptmv...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/javascriptmvc?hl=en.
>
>
--
Phone: +49-7071-1380380
Fax: +49-7071-1380389
Mobile: +49-171-2129566
Skype: nulldevice.de
Please consider the environment before printing this email.
doesn't this.callback create a function closure you are never deleting here?
basically
var f = this.callback("otherFunction");
and at some point you would need to
delete f;
otherwise you are leaving function pointers around and that means a mark and sweet garbage collector won't collect.
var me = this;
this.funcPointer = function (..)
{
me.callSomeFunc()
}
delete this.funcPointer;