Hello, I was implementing TMenu for Qt, when I got a little confused by component arrays.
On the file menu.inc I see this: procedure TMenu.CreateHandle; var i: integer; begin FItems.Handle := TWSMenuClass(WidgetSetClass).CreateHandle(Self); // initiate creation of subitems // Note: FItems is a TMenuItem. Using HandleNeeded will create all subitems. for i:=0 to Items.Count-1 do if Items[i].Visible then Items[i].HandleNeeded; end; And here is how Items is declared on this class: FItems: TMenuItem; .............. property Items: TMenuItem read FItems; My doubts are: 1 ) Can I just take a property and use it as an array like that?? Shouldn't that property be declared like this: property Items[Index: Integer]: TMenuItem read FItems; 2) And if it was declared like above, shouldn't FItems be an array of TMenuItem ? Are TComponent descendents naturally arrayable or something like that? thanks, -- Felipe Monteiro de Carvalho _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives