Changeset 119 for branches/generator/Forms/UFormRules.pas
- Timestamp:
- Nov 29, 2017, 12:31:26 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/generator/Forms/UFormRules.pas
r117 r119 58 58 UFormRule, UCore; 59 59 60 const 61 BooleanText: array[Boolean] of string = ('No', 'Yes'); 62 60 63 { TFormRules } 61 64 … … 88 91 FormRule: TFormRule; 89 92 begin 90 Rule := TRule(ListView1.Selected.Data); 91 FormRule := TFormRule.Create(nil); 92 FormRule.LoadData(Rule); 93 if FormRule.ShowModal = mrOk then begin 94 FormRule.SaveData(Rule); 95 ReloadList; 93 if Assigned(ListView1.Selected) then begin 94 Rule := TRule(ListView1.Selected.Data); 95 FormRule := TFormRule.Create(nil); 96 FormRule.LoadData(Rule); 97 if FormRule.ShowModal = mrOk then begin 98 FormRule.SaveData(Rule); 99 ReloadList; 100 end; 101 FreeAndNil(FormRule); 96 102 end; 97 FreeAndNil(FormRule);98 103 end; 99 104 … … 123 128 Item.Caption := Rules[Item.Index].Name; 124 129 Item.Data := Rules[Item.Index]; 125 Item.SubItems.Add(Rules[Item.Index].Items.GetBNF); 130 Item.SubItems.Add(BooleanText[Rules[Item.Index].CreateSourceNode]); 131 Item.SubItems.Add(Rules[Item.Index].Items.GetString); 126 132 end; 127 133 end;
Note:
See TracChangeset
for help on using the changeset viewer.