Correction to Pico/EDA
Mike Porter pointed out a problem with the example in my last post.
In the example of usage it should of course say:
container.register(Boy.class, Boy.class); Boy boy = (Boy)container.getComponent(Boy.class);
otherwise pico won’t have a chance to give the boy its Kissable.
Note to self - remember that cool idea you had about only ever putting source code into blogs that compiled and ran and had been copy-pasted directly from an IDE? D’oh :-)
By the way, the Kissable example is from a presentation of Aslak’s about Inversion of Control. I won’t go into the details here - but if we can get him to do it more widely you should be very afraid…
September 12th, 2003 at 8:48 am
Na, actually you’re right. At the moment we register instances because it was easier to implement - but they should be registered in the normal Pico way. Registering instances is pretty much deprecated in Pico world.