I'd suggest you stick to the parent.parent solution for the moment. The stuff we would post will surely just confuse you more and it will do more harm then good. The solution described by maskedMan is a better solution than parent.parent but also that solution could be taken a few steps higher by introducing different manager classes that would handle the moving and stuff... Ideally objects don't have to directly know about each other.
Just stick with the parent.parent solution for the moment and once you get more experienced with the technology and OOP then you can try to solve such problems in a more correct manner.
Jusy my 2 cents,
Cheers.
Last edited by Barna Biro; 11-23-2009 at 11:05 PM.
|