Abdelrazak Younes wrote:
Andre Poenitz wrote:
On Sun, Sep 17, 2006 at 10:03:33PM +0200, Abdelrazak Younes wrote:
Code that is not understandable is bad and should be simplified. In
addition, these changes would enable me to get rid of the LyXView
dependency in BufferView.
Check 'svn blame'. If it says 'poenitz' or such just apply your patch.
In this case it's leftovers from distributing 'dispatch' (which was much
more monolithic a while ago..)
Well, everyone and his dog is telling me that my patch is bad so I just
reverted my tree...
You really need to go to Denmark ;-)
In truth, the whole dispatch thing is a PITA and has bitten us many
times in the past. Things really *are* much better now than they were;
André's distributed dispatch now means that we take as much advantage of
the compiler's help as we can. Inset's only worry about those LFUNs that
are pertinent to a particular inset for example.
Unfortunately, there's no obvious better solution than these big, ugly
switch statements. At least, not in C++. I believe John wrote a perl
script at one stage to generate the C++ dispatcher code automatically,
but the details escape me. And anyway, it wasn't really clear if it was
"better" than what we have at the moment.
Maybe you could plan an Alexandrescou-like factory so that the
stakeholders could register there interest in particular LFUNs... (inset
A says "I'm interested in LFUN B, etc.)
Angus