On Wed, Aug 08, 2007 at 12:00:08PM +0100, Chris Bowditch wrote:
> Vincent Hennebert wrote:
>
>> Hi all,
>> There???s something quite strange in the layout code that I suspect comes 
>> from the pre-Knuth era.
>
> Yes I think you are right.
>
>> AbstractLM defines a reset method that among other things calls 
>> resetPosition on children LMs. If you search for references to this reset 
>> method, you find out that it is only called within resetPosition methods. 
>> But those resetPosition methods are themselves only called by the reset 
>> method!
>> Unless I missed something those methods aren???t useful anymore and could 
>> be removed. Anyone against? It???s not like the layout managers needed to 
>> be cleaned up...
>
> IIRC, those methods are intended as a means of allowing the IPD to change. 
> Currently the LMs dont allow the IPD to change mid page sequence, but if 
> the reset methods are properly implemented then if a change in IPD is 
> detected then reset would be called on the PageSequenceLM. Of course, I 
> don't believe the reset methods are properly implemented for the Knuth 
> model, so you could remove them now and start from scratch when 
> implementing support for changing IPD.

In the best-fit method the code always went one node too far, and then
reset itself to the best node using these reset methods. Indeed, they
do not seem useful anymore.

Simon

-- 
Simon Pepping
home page: http://www.leverkruid.eu

Reply via email to