swift - Correct way to pass data between objects through middlemen -


my project has myviewcontroller children inside of mywindow, , 1 of children has properties should set through settings located in window. mywindow quite short:

class mywindow: nswindow {      @iboutlet var viewcontroller:myviewcontroller!     var win2 = mysettingswindowcontroller(windownibname: "mysettingswindowcontroller")     @ibaction func show(sender:anyobject){         win2.showwindow(sender)         win2.storage.body_arr = viewcontroller.getsimulationcurrentparameters()     } } 

i know looks real bad, cannot think of other solution. doesn't work want it, because changes body_arr should applied simulation parameters inside of object inside of myviewcontroller (they should same). how should done? seems there 3 objects between storage , mysimulation


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -