[lazarus] Notebook page removal

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Aug 12 09:21:17 EDT 2003


On Tue, 12 Aug 2003 13:32:30 +0200
Micha Nelissen <M.Nelissen at student.tue.nl> wrote:

> Hi,
> 
> Please take a look at TNBPages.Remove in customnotebook.inc. 
> NewPageIndex is the new page to select. If it is the same as the one to 
> remove it selects one to the left or right. After that the 'Index' page 
> gets removed. However, at the end it selects NewPageIndex-1 if 
> NewPageIndex>=Index, why? It already caused a page different from the 
> removed page to be selected, why bother another selection?
> 
> This line, 132, is causing errors when destroying the component, trying 
> to select pages that don't exist.

It only selects a non existing page, when the last page is deleted. Then it
selects -1. No?

Mattias






More information about the Lazarus mailing list