From: Erik V. <eri...@hc...> - 2006-04-18 20:07:37
|
> > One culprit was the ORPanel custom repaint() method, > > which wiped out everything just written to the grid. > > I have renamed this method to recreate(), and it is now only called > > at an OR change. revalidate() now does the repainting job > after each action. > > I'd been working on fixing this. However, my preferred solution was to > store this information in model objects, and then have repaint() pull > the information from the model. > > Right now, using observables, this data isn't stored anywhere > but in the UI. I would rather say, that it is not stored anywhere else but in the Model, and pushed from there to the UI.... In fact, you can still switch off the use of Observables by setting StatusWindow.useObservables to false... except, that the new StockChart does not (yet) support this mode. But I think that once we split the code into a server and a client part (for Internet play), we will have to resort to some kind of server push (rather than client pull) anyway. Of course, Observer then must be replaced by something that can bridge the client/server gap. To be honest, the value push by the Model is done, but the View does not yet pick it up that value. Instead, once it gets the signal that something has changed, it pulls the value as it would do on a repaint(). But using the pushed value will be a pretty minor change. Erik. |