On 14 August 2012 16:47, Jasper St. Pierre <jstpie...@mecheye.net> wrote: > On Tue, Aug 14, 2012 at 2:45 AM, Amy C <mathematical.cof...@gmail.com> wrote: >> Hi all, >> >> For some reason, I can't seem to patch WorkspacesDisplay. (I'm trying >> to define what happens when you scroll your mouse button over the >> workspace thumbnail sidebar in the overview): >> >> const WorkspacesView = imports.ui.workspacesView; >> const WDproto = WorkspacesView.WorkspacesView.prototype; >> >> let storage; >> function enable () { >> storage._onScrollEvent = WDproto._onScrollEvent; // store the original >> WDproto._onScrollEvent = function () { >> log('stole the scroll event'); >> }; >> } > > When you connect to a signal, it passes the function object, not the > prototype and function name.
Oh, I guess that makes sense. (I had hoped that by changing .prototype.eventcallback, that gets replaced *before* _init gets called (which connects up the signals), hence substituting the overridden callback instead of the original one). I have worked around it. cheers! _______________________________________________ gnome-shell-list mailing list gnome-shell-list@gnome.org https://mail.gnome.org/mailman/listinfo/gnome-shell-list