From: Erik V. <eri...@xs...> - 2012-01-27 22:56:23
|
The point is that we don’t have a trigger except through the Observer interface itself. Perhaps I can set up something that does not just handle the captions but the whole columns. Another way would be to add indirection in the game engine in a similar way as I have done for the captions: putting the Model objects in arrays and reorder these arrays. But there the problem is that the models are not kept somewhere centrally. It seems I’ll have to rethink my solution for the captions as well, and generalise it somehow to cover whole columns. Stay tuned. Erik. From: Dr....@t-... [mailto:Dr....@t-...] Sent: Friday, January 27, 2012 11:30 PM To: Rails Development Subject: [Rails-devel] GameStatus PlayerReordering consequences.. Hm, as far as i can decipher the code :). You are using addField to set the information in the gridpanel and then add an Observer to the datamodel linking it to that information field. Would a possible way to deregister the observer and refill the field/fields once after the playerorder has been changed and add the observers again ? (a "replaceField" method perhaps ?) Sorry but i have the feeling that this is beyond my current understanding :( Nevertheless i'll give it a try :) Regards, Martin Von: "Erik Vos" <eri...@xs...> An: <Dr....@t-...>, "'Rails Development'" <rai...@li...> Betreff: RE: [Rails-devel] Fw: Re: Push Request : 1880 Code Update Part II Datum: Fri, 27 Jan 2012 22:51:11 +0100 Ah, I must have been under the false impression that only the captions were wrong. I didn’t really look at the numbers. Perhaps you can take the captions as an example. All cells are already variable, so it’s only the view-model relations that somehow need to be reordered. Erik. From: Dr....@t-... [mailto:Dr....@t-...] Sent: Friday, January 27, 2012 10:23 PM To: Erik Vos; Rails Development Subject: Re: [Rails-devel] Fw: Re: Push Request : 1880 Code Update Part II Hi Eric, thanks for your help! That takes of course care of the caption, what i doesnt solve is the second part, Now the player order is shown in the right order but the fields associated with the players remain in the old order. I'll have a look at that now. Regards, Martin |