Changeset 136 for branches/generator/Forms/UFormGrammer.pas
- Timestamp:
- Dec 26, 2017, 6:59:40 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/generator/Forms/UFormGrammer.pas
r129 r136 17 17 ButtonOk: TButton; 18 18 ComboBoxStartRule: TComboBox; 19 ComboBoxWhiteSpaceRule: TComboBox; 19 20 Label1: TLabel; 21 Label2: TLabel; 20 22 procedure FormShow(Sender: TObject); 21 23 private … … 49 51 end; 50 52 ComboBoxStartRule.Sorted := True; 53 54 ComboBoxWhiteSpaceRule.Items.Clear; 55 for Rule in Grammer.Rules do begin 56 ComboBoxWhiteSpaceRule.Items.AddObject(Rule.Name, Rule); 57 end; 58 ComboBoxWhiteSpaceRule.Sorted := True; 51 59 end; 52 60 … … 58 66 ComboBoxStartRule.ItemIndex := ComboBoxStartRule.Items.IndexOfObject(Grammer.TopRule); 59 67 end else ComboBoxStartRule.ItemIndex := -1; 68 if Assigned(Grammer.WhiteSpaceRule) then begin 69 ComboBoxWhiteSpaceRule.ItemIndex := ComboBoxWhiteSpaceRule.Items.IndexOfObject(Grammer.WhiteSpaceRule); 70 end else ComboBoxWhiteSpaceRule.ItemIndex := -1; 60 71 end; 61 72 … … 66 77 Grammer.TopRule := TRule(ComboBoxStartRule.Items.Objects[ComboBoxStartRule.ItemIndex]) 67 78 else Grammer.TopRule := nil; 79 if ComboBoxWhiteSpaceRule.ItemIndex <> -1 then 80 Grammer.WhiteSpaceRule := TRule(ComboBoxWhiteSpaceRule.Items.Objects[ComboBoxWhiteSpaceRule.ItemIndex]) 81 else Grammer.WhiteSpaceRule := nil; 68 82 end; 69 83
Note:
See TracChangeset
for help on using the changeset viewer.