[ProgSoc] Jumpy code
John Elliot
jj5 at jj5.net
Wed Oct 14 23:54:58 EST 2009
Anand Kumria wrote:
> Why not:
>
> public void Display() {
> DetachHandlers();
> ClearDisplay();
> RenderState();
> AttachHandlers();
> }
>
> public void RenderState() {
> if ( State == null )
> return;
> // other stuff
> }
Or...
public void Display() {
DetachHandlers();
ClearDisplay();
if ( State != null ) { RenderState(); }
AttachHandlers();
}
public void RenderState() {
// render state
}
Deal!
More information about the Progsoc
mailing list