Fixes an index out of bounds error in TTrayIcon and adds more debug info to TNotebook

git-svn-id: trunk@29126 -
This commit is contained in:
sekelsenmat 2011-01-19 21:41:38 +00:00
parent ac124baa55
commit 32420f5e83
2 changed files with 3 additions and 2 deletions

View File

@ -3,7 +3,7 @@
{******************************************************************************
TCustomTrayIcon
******************************************************************************
Felipe Monteiro de Carvalho
*****************************************************************************
* *
* This file is part of the Lazarus Component Library (LCL) *
@ -337,6 +337,7 @@ begin
if FIcons=AValue then Exit;
FIcons.Assign(AValue);
if Visible then InternalUpdate();
FCurAnimationStep := 0; // Avoids index out-of-bounds errors when changing to a new imagelist
end;
procedure TCustomTrayIcon.SetPopUpMenu(const AValue: TPopupMenu);

View File

@ -146,7 +146,7 @@ end;
function TNotebook.GetPage(AIndex: Integer): TPage;
begin
if (AIndex < 0) or (AIndex >= FPageList.Count) then
RaiseGDBException('TUntabbedNotebook.GetCustomPage Index out of bounds');
RaiseGDBException(Format('TNotebook.GetCustomPage Index out of bounds. AIndex=%d', [AIndex]));
Result := TPage(FPageList.Items[AIndex]);
end;