|
From: Steven M. <sr...@us...> - 2005-03-21 02:09:32
|
Update of /cvsroot/instantobjects/Source/Design In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24288 Modified Files: InstantDesignUtils.pas InstantModelExplorer.pas Log Message: Changed the code so that the 'assignable typed constants' compiler directive is not required in Core Designtime package and OF dll. Index: InstantModelExplorer.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Design/InstantModelExplorer.pas,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** InstantModelExplorer.pas 25 Feb 2005 18:32:21 -0000 1.7 --- InstantModelExplorer.pas 21 Mar 2005 02:09:22 -0000 1.8 *************** *** 630,636 **** function AddClass(Node: TTreeNode; AClass: TInstantCodeClass; ! Text: string): TTreeNode; ! const ! Level: Integer = 0; var I: Integer; --- 630,634 ---- function AddClass(Node: TTreeNode; AClass: TInstantCodeClass; ! Text: string; var Level: Integer): TTreeNode; var I: Integer; *************** *** 671,675 **** for I := 0 to Pred(SubItems.Count) do SubNodes.Add(AddClass(Result, ! TInstantCodeClass(SubItems.Objects[I]), SubItems[I])); RemoveInvalidNodes(Result, SubNodes); finally --- 669,673 ---- for I := 0 to Pred(SubItems.Count) do SubNodes.Add(AddClass(Result, ! TInstantCodeClass(SubItems.Objects[I]), SubItems[I], Level)); RemoveInvalidNodes(Result, SubNodes); finally *************** *** 690,694 **** --- 688,694 ---- FirstNode: TTreeNode; I: Integer; + Level: Integer; begin + Level := 0; FSelectedNode := nil; ModelView.Items.BeginUpdate; *************** *** 712,716 **** AClass := Model.Classes[I]; if (Style = msRelations) or not Assigned(AClass.BaseClass) then ! Nodes.Add(AddClass(nil, AClass, '')); end; ModelView.AlphaSort; --- 712,716 ---- AClass := Model.Classes[I]; if (Style = msRelations) or not Assigned(AClass.BaseClass) then ! Nodes.Add(AddClass(nil, AClass, '', Level)); end; ModelView.AlphaSort; Index: InstantDesignUtils.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Design/InstantDesignUtils.pas,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** InstantDesignUtils.pas 24 Feb 2005 00:17:06 -0000 1.6 --- InstantDesignUtils.pas 21 Mar 2005 02:09:22 -0000 1.7 *************** *** 55,76 **** SysUtils, TypInfo; procedure Busy(Enable: Boolean); - const - Cursor: TCursor = 0; - Count: Integer = 0; begin if Enable then begin ! if Count = 0 then begin ! Cursor := Screen.Cursor; Screen.Cursor := crHourglass; end; ! Inc(Count); ! end else if Count > 0 then begin ! Dec(Count); ! if Count = 0 then ! Screen.Cursor := Cursor; end; end; --- 55,77 ---- SysUtils, TypInfo; + var + __SaveCursor: TCursor = 0; + __BusyCount: Integer = 0; + procedure Busy(Enable: Boolean); begin if Enable then begin ! if __BusyCount = 0 then begin ! __SaveCursor := Screen.Cursor; Screen.Cursor := crHourglass; end; ! Inc(__BusyCount); ! end else if __BusyCount > 0 then begin ! Dec(__BusyCount); ! if __BusyCount = 0 then ! Screen.Cursor := __SaveCursor; end; end; |