Changeset 12 for ProtocolBuffers/UMainForm.pas
- Timestamp:
- Oct 20, 2009, 11:31:33 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ProtocolBuffers/UMainForm.pas
r11 r12 94 94 Tag := 2; 95 95 ItemType := itString; 96 ItemMode := im Optional;96 ItemMode := imRepeated; 97 97 end; 98 98 Items.Add(NewItem); … … 128 128 TPBStringItem(TPBMessageItem(PB.BaseMessage.Items[3]). 129 129 Items[0]).Value := 'Vsetínská'; 130 // TPBStringItem(PB.BaseMessage.Items[1]).Value := 'Abc'; 131 with TPBRepeatedItem(PB.BaseMessage.Items[1]) do begin 132 Items.Add(nil); 133 Items.Add(nil); 134 Clear(TPBDefinition(Definition.Items[1])); 135 TPBStringItem(Items[0]).Value := 'Test'; 136 TPBStringItem(Items[1]).Value := 'Hops'; 137 end; 138 130 139 DisplayTree(PB, TreeView1); 131 140 SaveToStream(Stream); … … 154 163 Tag := 2; 155 164 ItemType := itString; 165 //ItemMode := imRepeated; 156 166 DefaultString := 'Billy Joe'; 157 167 end; … … 227 237 NewNode: TTreeNode; 228 238 begin 229 for I := 0 to Definition.Items.Count - 1 do230 with TPBDefinition(Definition)do begin239 for I := 0 to PBRepeated.Items.Count - 1 do 240 with Definition do begin 231 241 NewNode := Node.Owner.AddChild(Node, ''); 232 242 if ItemType = itString then begin
Note:
See TracChangeset
for help on using the changeset viewer.