Design Element
Comment on "Intro to Memory and Arrays in C"
by Peter Ulvskov — May 28
My question relate to a particular variation of an NSMutableArray that I would like. It is often so that someone else has had a similar desire and chances are that the data structure that I want, has been developed already. So let me explain: Assume that I have a controller object, myControl, and a simple dataobject, myObject. myControl points to myObject, and myObject is incidentally also the fifth entry in an NSMutableArray. I would like myControl to be able to ask myObject about its position in the mutable array. Positions may change as new objects are inserted into the array, and array elements normally cannot know their own positions.
Has a variation of NSMutableArray been developed that allows this? If not, any advice on how to accomplish this?

Thanks ,

Back to "Intro to Memory and Arrays in C"
Design Element

Copyright © Scott Stevenson 2004-2015