Jean-Marc Lasgouttes wrote:
[EMAIL PROTECTED] writes:
Author: younes
Date: Wed Sep 12 10:15:56 2007
New Revision: 20237
URL: http://www.lyx.org/trac/changeset/20237
Log:
Fix PageDown/Up temporarily.
Does not compile here:
g++ -DHAVE_CONFIG_H -I. -I../../lyx-devel/src -I../../lyx-devel/src
-I../../lyx-devel/boost -Wextra -Wall
-I/System/Library/Frameworks/CoreFoundation.framework/Headers -g -O -MT
TextMetrics.lo -MD -MP -MF .deps/TextMetrics.Tpo -c
../../lyx-devel/src/TextMetrics.cpp -o TextMetrics.o
../../lyx-devel/src/TextMetrics.cpp: In member function 'void
lyx::TextMetrics::cursorNext(lyx::Cursor&)':
../../lyx-devel/src/TextMetrics.cpp:1538: error: no matching function for call to
'lyx::Text::dispatch(lyx::Cursor&, lyx::FuncRequest)'
../../lyx-devel/src/Text.h:124: note: candidates are: void
lyx::Text::dispatch(lyx::Cursor&, lyx::FuncRequest&)
I'll correct that, sorry.
BTW, I do not like calling Cursor::dispatch or Text::dispatch directly
(except in very clear cases). We should consider declaring it private
and setting LyXFunc as a friend (or something like that).
Enforcing a code path allows to do some common handling for each and
every lfun processing, and this is good.
We have this discussion every once in a while... I strongly believe on
the contrary that the multiple level of dispatch() is very, *very*
wrong. LyXFunc::dispatch() calling Cursor::dispatch() calling
Text::dispatch() calling Cursor::dispatch() calling LyXFunc::dispatch()
calling Cursor::dispatch() calling Text::dispatch() to end up in the
same Text at the end... talk about efficiency...
I am going to encapsulate the relevant LFUN in a function and just use that.
Abdel.