Angus Leeming <[EMAIL PROTECTED]> writes:

| On Wednesday 29 May 2002 4:55 pm, Lars Gullik Bjønnes wrote:
>> [EMAIL PROTECTED] (Lars Gullik Bjønnes) writes:
>>
>> I see that the text I added got lost... anyway
>>
>> Unless somebody objects this patch will go in, in just a short while
>> (minutes, not days).
>
| Not objecting but could you explain (since you're now the expert ;-)
>
| -     workarea_.scrollCB.connect(slot(this, &BufferView::Pimpl::scrollCB));
| +     workarea_.scrollCB.connect(boost::bind(&BufferView::Pimpl::scrollCB, this, 
| _1));
>
| What's the _1?

:-)

void foo(int a) {
 ... some code using a ...
}

function<void> f = bind(foo, 5);

f() calls foo(5);

function<void, int> g = bind(foo, _1);

g(5) calls foo(5);
g() will not work. missing argument.

_1 is a place holder argument.

| Index: src/BufferView_pimpl.h
| +#include "frontends/key_state.h"
>
| why is this added? You have changed nothing in the header file that requires 
| it?

I got a warning at some point about some missing stuff, then adding
this fixed it.

I'll try to remove it after the patch is in.

-- 
        Lgb


Reply via email to