ambitious-knife-25690
01/20/2023, 6:35 PMhappy-agent-4114
01/20/2023, 6:36 PMhappy-agent-4114
01/20/2023, 6:36 PMhappy-agent-4114
01/20/2023, 6:36 PMambitious-knife-25690
01/20/2023, 6:37 PMhappy-agent-4114
01/20/2023, 6:37 PMhappy-agent-4114
01/20/2023, 6:37 PMhappy-agent-4114
01/20/2023, 6:37 PMhappy-agent-4114
01/20/2023, 6:38 PMhx
//the fun part
private function loadGraph(graphParams:GraphParams, srvURL:String = "10.65.100.21:8080"):String {
//unitString is just a stringified list of units
//which would be easy but I made the units an enum so I could type it stricter
var unitString:String = Json.stringify([for (unit in graphParams.units) unitNames[EnumValueTools.getIndex(unit)]]);
//same with yparams
var yparamString:String = Json.stringify([for (param in graphParams.params) EnumValueTools.getName(param)]);
//daterange is formatted as YYYYMMDDHHMMYYYYMMDDHHMM which isn't hard to read or understand at all why would you say that
var dateRange = '${DateTools.format(graphParams.dateStart, '%Y%m%d%H%M')}${DateTools.format(graphParams.dateEnd, "%Y%m%d%H%M")}';
//parameterize!
var imgURL:String = 'http://$srvURL/dynamic/chart.jpg?DL=true&units=$unitString&yparams=$yparamString&daterange=$dateRange&sizeX=${graphParams.width}&sizeY=${graphParams.height}';
//reload the graph display
graphDisplay.resource = imgURL;
//also return the url in case I want that
//(i do in exactly one place)
return imgURL;
}
happy-agent-4114
01/20/2023, 6:40 PMambitious-knife-25690
01/20/2023, 6:42 PMhappy-agent-4114
01/20/2023, 6:43 PMhappy-agent-4114
01/20/2023, 6:43 PMhappy-agent-4114
01/20/2023, 6:44 PMhappy-agent-4114
01/20/2023, 6:44 PMambitious-knife-25690
01/20/2023, 6:45 PMhappy-agent-4114
01/20/2023, 6:45 PMhappy-agent-4114
01/20/2023, 6:45 PMhappy-agent-4114
01/20/2023, 6:45 PMambitious-knife-25690
01/20/2023, 6:46 PMrefined-laptop-39041
01/20/2023, 6:59 PMrefined-laptop-39041
01/20/2023, 6:59 PMrefined-laptop-39041
01/20/2023, 6:59 PMbright-gpu-74537
01/20/2023, 7:01 PMbright-gpu-74537
01/20/2023, 7:01 PMbright-gpu-74537
01/20/2023, 7:05 PM.resource
in haxeui uses its own stuff... no mechanism to swap it outrefined-laptop-39041
01/20/2023, 7:11 PMbright-gpu-74537
01/20/2023, 7:11 PMrefined-laptop-39041
01/20/2023, 7:18 PMfull-journalist-82607
01/20/2023, 8:25 PMhaxe
private override function onDataChanged(data:Dynamic) {
//var renderers = findComponents(ItemRenderer); OLD
var renderers = findComponents("table_item_renderer", ItemRenderer); //NOW
for (r in renderers) {
r.onDataChanged(data);
}
[...]
itemRenderer = new CompoundItemRenderer();
_tableview.itemRenderer = itemRenderer;
}
child.addClass("table_item_renderer");
itemRenderer.addComponent(child);
return child;
In fact other item renderers would be integrated in the data update values loop of the table, and it would start hiding all these components. (and for some reason would also bother the vertical layout )
Now this surely won't work if you have a table inside a table lol
I have now only two tiny far less important bugs left in the table view for me ( and one that could me) . Quite happy 🙂 I was getting obsessed with this table bug