From: brett l. <wak...@gm...> - 2006-02-08 23:12:55
|
On 2/8/06, Erik Vos <eri...@hc...> wrote: > > The bigger issue that bothers me is that many of these classes have > > constructors that are pulling data from other UI objects. > > > > This strikes me as something that severely breaks model/view > > separation. > > > > For example, the ORWindow shouldn't be passed an OperatingRound, it > > should be checking GameManager for what the current round is, and > > whether it's an OperatingRound. > > That is right, or whether there isn't any round at all yet > (which I believe is true when the window is created). > > > I've been looking at cleaning this up and making ORWindow behave a bit > > more like StockChart, but it's looking like the changes are going to > > be very invasive and require rewriting a bunch of areas of the UI. > > Talking about StockChart: a while ago I was getting pretty annoyed by > double flickering in the StatusWindow after each share Sell or Buy action= . > This turned out to be just the area where StatusWindow overlapped > StockChart. > It looks like if StockChart is fully repainted twice after each action in > StatusWindow, > even if no price has changed at all! > > On this point I would prefer to have StockChart behave more like the othe= r > windows, > where only parts are repainted where and when something has changed. > That would speed up repainting too. We can just stop calling repaint the second time. This should clear up most of the issue. Though, I do agree (and it's even recommended) to not call the no-argument repaint(), but instead call one of the repaint methods with an argument that specifies the region to be repainted. > > The ORWindow constructor is way too complicated as it is, > no doubt it can be simplified. > I am working on it. However, there's a lot of implications to this change that affects many other areas. In short, it's highly invasive. Right now, I've got most of the changes in my local tree, but there's still a lot of things within the ORWindow that have been broken. If you like, I can commit my changes so you can help in reworking the ORWindow, or I can keep working on them privately and commit them after I've gotten more of the ORWindow working. ---Brett |