On Fri, Dec 14, 2001 at 11:02:51AM +1100, Ben Stanley wrote: > When I did my extended error reporting modification to LyX, I added > Inset Visitors. I found them to be very useful...
They are... Sometimes. > This means that all the 'spellchecking' (or whatever) code related to a > single kind of operation is contained within a single visitor class > instead of being strewn all over the code in methods of individual insets. The problem usually is: You have a bunch of classes, and a bunch of things you want to do. 'Visitor' vs 'virtual functions in the class' boils down to decide what should get stronger coupling - stuff belonging to a class or stuff implementing some functionality. And that is some kind of religious issue again, especially if you do not want to prefer either... My thinking in those cases usually goes along the lines: What is more likely in the future: Adding new classes (i.e. Insets in our case) or adding new functionality? Andre' -- André Pönitz .............................................. [EMAIL PROTECTED]