Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-08

Notebook page removal

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Micha Nelissen

Hi,

Please take a 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.

Regards,

Micha.

Reply by email

Mattias Gaertner
to Micha Nelissen
Show quoted text 11 lines
Hi, Please take a 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

Reply by email