From: Jamis Buck Date: 2004-10-10T23:17:12+09:00 Subject: Re: DI service change notifications (Syringe) leon breedt wrote: > On Sun, 10 Oct 2004 22:34:59 +1300, leon breedt wrote: > >>contrived pseudocode example: >> >>env = { :log_filename => 'test.log' } >>container.register(:log_filename) { env[:log_filename] } >>container.register(:logger) { |c| Logger.new(c.log_filename) } > > i am aware that there will have to be a link between env and container > to ensure that the dirty flag will be set, first of all, and set on > the correct service, secondly :) > > possibly env would be a special service instead of floating Hash, and > access to env would happen through an interceptor gatekeeper... Arg. After my last rambling message, I realized I might have missed the mark of what you were asking. Did you want: (A) The have existing references to Logger refresh themselves and start logging to the new file? or (B) To have existing references to Logger remain unchanged and have new loggers start logging to the new file? (A) is not so simple to do (as I mentioned in my last post). (B), however, would be much more straightforward. - Jamis -- Jamis Buck jgb3@email.byu.edu http://www.jamisbuck.org/jamis