Subject: | |
From: | |
Reply To: | |
Date: | Sun, 27 May 2012 16:03:09 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Hi Axel. Yes, this sort of thing should be done in the start() method. So why are they sometimes also set up in init()? Because even if the model isn't running, you're still "visualizing" it by having a window open which displays the (pre-running) model. So you have to initialize it to _something_ when the window is first created.
Sean
On May 27, 2012, at 2:06 AM, Axel Kowald wrote:
> Okay, I found a solution.
> Instead of creating the Display2D in the init() method, I moved it to the
> start() method and used this.controller.registerFrame() to register the
> frame with the controller.
> Now everything works, because I create the Display2D now after I have set
> the new grid dimensions in the controller window. It seems that I could move
> in principle everything from the init() method into the start() method. But
> why do I need then a separate init() ?
> Any comments ?
>
> Axel
|
|
|