Changeset 116 for branches/generator/Forms/UFormRules.pas
- Timestamp:
- Nov 27, 2017, 10:04:52 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/generator/Forms/UFormRules.pas
r114 r116 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, 9 9 ComCtrls, ActnList, Menus, URules; 10 10 … … 32 32 procedure ARemoveExecute(Sender: TObject); 33 33 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 34 procedure FormCreate(Sender: TObject); 34 35 procedure FormShow(Sender: TObject); 35 36 procedure ListView1Data(Sender: TObject; Item: TListItem); … … 107 108 end; 108 109 110 procedure TFormRules.FormCreate(Sender: TObject); 111 begin 112 Rules := nil; 113 end; 114 109 115 procedure TFormRules.ListView1Data(Sender: TObject; Item: TListItem); 110 116 begin … … 112 118 Item.Caption := Rules[Item.Index].Name; 113 119 Item.Data := Rules[Item.Index]; 114 Item.SubItems.Add(Rules[Item.Index].Items.GetBNF(Rules[Item.Index]. RuleType));120 Item.SubItems.Add(Rules[Item.Index].Items.GetBNF(Rules[Item.Index].Items.RuleType)); 115 121 end; 116 122 end; … … 140 146 procedure TFormRules.ReloadList; 141 147 begin 142 ListView1.Items.Count := Rules.Count; 148 if Assigned(Rules) then ListView1.Items.Count := Rules.Count 149 else ListView1.Items.Count := 0; 143 150 ListView1.Refresh; 144 151 end;
Note:
See TracChangeset
for help on using the changeset viewer.