#242 ✓resolved
Gokul

Something like Mootools Class.Binds would be nice to facilitate proper binding of methods.

Reported by Gokul | May 11th, 2010 @ 03:00 PM | in 2.0.0 Release

When we organize the client side UI into many classes, many instance methods are called from within other functions (like event listeners) and will need an explicit 'bind' to make them work in the correct context.
It will be nice to have something like Mootools 'Binds' - http://mootools.net/docs/more/Class/Class.Binds

Thanks,
Gokul.

Comments and changes to this ticket

  • MadRabbit

    MadRabbit May 11th, 2010 @ 05:21 PM

    • Tag changed from binding to class, core, feature, implementation

    yes, that's kinda nice feature, will think about it.

  • MadRabbit

    MadRabbit May 22nd, 2010 @ 12:46 PM

    • Milestone set to 2.0.0 Release
    • State changed from “new” to “resolved”

    I've added the feature, but named it prebind which sounds more correct to me

    var A = new Class({
      prebind: $w('boo hoo'),
    
      boo: function() { 
      },
    
      hoo: function() {
      }
    });
    

    It will go public with the 1.6 release. It also available in master at github

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

RightJS Core Tickets

Shared Ticket Bins

People watching this ticket

Pages