posted 9 years ago
Good Evening Everyone,
This post is connected to my last post "How can two different objects receive notification of the same event?"
A correct solution to that specific problem was provided by Omar Rashwan - thank you Omar.
However, I realised that it was not the question I should have been asking in the first place - comments from Campbell Ritchie provided an impetus.
So I re-analysed the problem, with simple diagrams, and found that the use of the INNER CLASS provided a much more elegant solution.
That re-analysis has resulted in a short article Usefulness of Inner Classes click on link that simply encapsulates the problem and provides the solution (without the nitty gritty of my project). I hope that people faced with brain-warp, as I was, might find it useful.
The implementation of the inner class solution appears in the source code below: