Wednesday, August 12, 2009

wxErlang in Action -- Listing 1.2

So, after a long episode of IRL (and work), and some fruitless delving through the wxErlang docs...

Now there are factorings that could be made to make this more "subclass"-able -- let loop take an arbitrary term and a fun/3 of loop, the term and a message term, passed in as a handler for any other message, and return ok if looping is to continue, and allowing for code hot-swapping; but this is probably better to just be a template at the source level.

No comments :