Angus Leeming wrote:
Abdelrazak Younes wrote:
I don't really get why you need a signal. Why can't a BufferView.message function not call a WorkArea.message function? There's a one-to-one correspondence, no?

For now yes but I can very well imagine multiple WorkArea using the same BufferView.

Use-case: a teacher wants to show how to write a LyX document. The student just have to watch on their WorkArea what the teacher is doing. Only one WorkArea could be read-write at a time. All other WorkAreas would be watch only.

Sounds fun, doesn't it?

Sounds like pie in the sky ;-) Don't over-complicate things; you can always switch to a signal when ytou've implemented your mulitple WorkAreas.

Man, I have worked so hard to remove the WorkArea dependency from BufferView and you want me to put it back? Beside, the code will be more complicated if I have to store the "owner" workarea. And final point, those message are just sugar and they conceptually can be displayed anywhere not just the WorkAreas.


The signals make debug backtraces totally inpenetrable.

You have a point here but debugging is OK, it's just a matter of getting used to it (with correctly placed breakpoints).

> That's a
real-world, right-now problem that we won't have if you use functions. Also, signals are sloooooowwwww, as you're finding out elsewhere.

AFAIK boost slots are _much_ faster than Qt slots. In any case this not really a problem right now as there are other things much heavier to optimize.

So I'd rather do the other way around and switch back to function calls if it turns out to be too heavy (which I don't think it will ;-)).

Agreed?

Abdel.

Reply via email to