Hello Jan, to me this sounds like you need to implement perhaps 2 things:
1. a setter for the <address-bar>, which takes care of updating things, when a completely new <address-bar> is added. 2. some kind of observer pattern, where the <file-manager> registers itself as a listener to changes in the <address-bar>. Probably a method at the <address-bar>, something like `register-change-listener`, which adds the argument it takes to a list or a set of listeners. Then you need to take care, that on relevant updates all registered listeners are notified of the change. Furthermore you can register the <file-manager> as a listener at the <address-bar> when the <address-bar> is set using the setter and unregister as listener at the previously set <address-bar> (which is now replaced by the new one). I have not worked with GOOPS yet, so my answer is not GOOPS specific and perhaps there are better ways, but I think this is the classic approach to the problem. Regards, Zelphir On 17.07.20 01:24, Jan Wielkiewicz wrote: > Hello, > > I would like make objects of two different classes communicate, but I'm > not sure how to implement it or if there already exists something for > the purpose. > > Say I have two classes: <file-manager> and <address-bar>. > During initialization of an <file-manager> object, it creates a slot > containing <address-bar> object. > > I would like to make the <file-manager> object to know when address in > the address bar is changed, for example (set-address address-bar1 > "/home/user"). > > Any suggestions? Thanks in advance. > > > Jan Wielkiewicz > -- repositories: https://notabug.org/ZelphirKaltstahl
