Search the Community
Showing results for tags 'variants'.
Confused on the following errors while setting up a tiered data structure (f.i. business with multiple departments with multiple staff per department) procedure TForm1.InitializeForm; begin inherited; // this is a good place to initialize components var MyList1 : variant := new JObject; MyList1.Business := TVariant.CreateObject; MyList1.Business.Name := 'MyBusiness'; MyList1.Business.Depts := TVariant.CreateArray; MyList1.Business.Depts.push(class DeptName := 'DepartmentA'; Staff := ['st1','st2']; end); MyList1.Business.Depts.push(class DeptName := 'DepartmentB'; end); M
I needed a super chart component and stumbled on 'zoomcharts', a nice js library with good looking chart types. This library even includes a typescript file. However parsing it through the ts2pas tool results in a whopping 3000 lines of code. A bit daunting and of course most of the exported functions will never be used by an average user. The minimum unit for accessing this library cuts it all down to some 20 lines, looking like unit Zoom; interface type JZoomCharts = class external Procedure PieChart(V: Variant); external 'PieChart'; Procedure NetChart(V: Variant