Recent

Author Topic: No Generics for VST?  (Read 1615 times)

egsuh

  • Hero Member
  • *****
  • Posts: 870
No Generics for VST?
« on: November 27, 2021, 04:10:14 am »
I'm reviewing VST. Isn't it possible to write some generics for VST?
Or, directly adding objects, instead of record?

I guess VST.AddChild calls procedure GetMem internally. If specific record type is defined, then the record size is pre-defined, so it can be called internally.

Of course there might be functions that I do not know, cases like record types are different between nodes. But in general cases that would not be the case.

Ar least, I'd like to overwrite following things within VST's descendants or helpers' methods, not Form's event handlers.


procedure TForm1.VSTGetNodeDataSize(Sender: TBaseVirtualTree; var NodeDataSize: Integer);
begin
  NodeDataSize := SizeOf(TTreeData);
end;

 

TinyPortal © 2005-2018