tags:

views:

43

answers:

1

what would be the recommended way for my main window to communicate with his children when my motivation is that when an action is being made on one child another one action is invoked so who should know who ?

  1. shold the children get thier father interface and then on thier on_click give make an action from the given interface

2.should the father hold all the onclick methods (this one wont be generic )?

3.is there any design pattern which is directly this one ?

note: I want to mange the main view an dispose any item whom I don't use ...

lets just for this example say i have a list view textbox and a button in one panel and in another panel a picture-view

when someone click the button the choice in the list is emphasize(lets say coloured in red ...) the text box shows i the list item information and the other panel picture is shown notice i don't want the entities (textbox button etc...) to know about each other cause tomorrow i can change from text box to label so i have to do it generic ....

A: 

You can try to use the Observer design pattern.

Itay