[Lazarus] attn mattias / notebook onchange / sourceeditor

Martin lazarus at mfriebe.de
Thu May 27 16:01:04 CEST 2010


On 27/05/2010 14:17, Mattias Gaertner wrote:
> On Thu, 27 May 2010 14:11:45 +0100
> Martin<lazarus at mfriebe.de>  wrote:
>
>    
>> they are no longer triggered at all?
>>      
> Not even if user clicks on another tab?
>    
What I meant:

we keep NotebookPagechenged.
But in the code below, we do not need the IF => because we have to make 
the call always?

procedure TSourceNotebook.SetPageIndex(const AValue: Integer);
begin
   FPageIndex := AValue;
   if FUpdateLock = 0 then begin
     FPageIndex := Max(0, Min(FPageIndex, FNotebook.PageCount-1));
     if Assigned(Manager) and (FNotebook.PageIndex = FPageIndex) then
       Manager.DoActiveEditorChanged;
     // make sure the statusbar is updated
     Include(States, snNotbookPageChangedNeeded);
     FNotebook.PageIndex := FPageIndex;
// the if below
     if snNotbookPageChangedNeeded in States then
       NotebookPageChanged(nil);
   end;
end;





More information about the Lazarus mailing list