Re: an oldie but a goodie: observing properties of collected objects

2010-06-22 Thread Benjamin Rister
On Jun 17, 2010, at 10:02 PM, Ken Thomases wrote: > Also, you could probably abstract it out into a custom class to facilitate > array observing, if you really wanted it. Maybe somebody already has, for > all I know. In fact, I put our implementation of this up on github last year: http://gith

Re: an oldie but a goodie: observing properties of collected objects

2010-06-17 Thread Matt Neuburg
On Jun 17, 2010, at 7:02 PM, Ken Thomases wrote: > you could probably abstract it out into a custom class to facilitate array > observing, if you really wanted it. Maybe somebody already has, for all I > know. Yeah, that's kind of what I was wondering. Or I guess you could "just" roll your o

Re: an oldie but a goodie: observing properties of collected objects

2010-06-17 Thread Ken Thomases
On Jun 17, 2010, at 8:16 PM, Matt Neuburg wrote: > That's pretending that "self", who owns the array, is also the one who wants > to do the observing, that it always wants to do it, etc. Obviously that's > easy. > > I'm talking about the general problem of any object registering through the > arr

Re: an oldie but a goodie: observing properties of collected objects

2010-06-17 Thread Ken Thomases
On Jun 17, 2010, at 8:07 PM, Jerry Krinock wrote: > I was going to ask what happens if this object which owns 5000 widget objects > gets deallocated. Their observers have not been removed and I would expect > nastygrams like this [1]. But then I noticed that your observer is 'self'. > > Ken,

Re: an oldie but a goodie: observing properties of collected objects

2010-06-17 Thread Matt Neuburg
On Thu, 17 Jun 2010 14:51:04 -0700, Jerry Krinock said: > >On 2010 Jun 17, at 12:21, Matt Neuburg wrote: > >> My question is, does anyone have a *simple* approach to this common problem? > >Not necessarily any simpler, but another technique which may be better than observing each object in some si

Re: an oldie but a goodie: observing properties of collected objects

2010-06-17 Thread Jerry Krinock
On 2010 Jun 17, at 15:33, Ken Thomases wrote: > Where's the difficulty, again? I was going to ask what happens if this object which owns 5000 widget objects gets deallocated. Their observers have not been removed and I would expect nastygrams like this [1]. But then I noticed that your obser

Re: an oldie but a goodie: observing properties of collected objects

2010-06-17 Thread Ken Thomases
On Jun 17, 2010, at 2:21 PM, Matt Neuburg wrote: > It has been well said by mmalc that "Observing a collection is not the same > as observing the properties of the objects in a collection." Specifically, > in that oh-so-common configuration, an NSMutableArray of MSMutableDictionary > objects, if e

Re: an oldie but a goodie: observing properties of collected objects

2010-06-17 Thread Jerry Krinock
On 2010 Jun 17, at 12:21, Matt Neuburg wrote: > My question is, does anyone have a *simple* approach to this common problem? Not necessarily any simpler, but another technique which may be better than observing each object in some situations, (although not yours, without modification). Implem

an oldie but a goodie: observing properties of collected objects

2010-06-17 Thread Matt Neuburg
This question is a FAQ, but I'm going to ask it anyway. It has been well said by mmalc that "Observing a collection is not the same as observing the properties of the objects in a collection." Specifically, in that oh-so-common configuration, an NSMutableArray of MSMutableDictionary objects, if ev