I have looked through the forums, but don't think I have the problems that
were described.

I have a Cocoa app with a main window and a secondary window.  I have a
single controller.  I don't have a model or a document because I am reading
info from the OS and displaying it.

In the controller, I have an NSMutableArray that holds a list of names that
I queried from the OS when an entry in the primary window is selected.  The
secondary window contains an NSBrowser.  The controller is a delegate for
the NSBrowser.

When the entry in the primary window is selected, the OS is queried for that
object and a list of 9 strings is obtained and stored in the NSMutableArray
(shows up as NSCFArray * after I have added stuff to it).

The first NSBrowser delegate to get hit is numberOfRowsInColumn.  At this
point, the array in the controller still contains the 9 strings.  (It is
also the same self address for the controller from when the strings were
added).

The second NSBrowser delegate to get hit is willDisplayCell:atRow:column:
When I get to this call, the array has 0 objects.  The self pointer is still
the same.

I thought I had a retain issue, so I checked the retain count before and
after adding the strings to the array.  It is 1 before and 2 after as you
would expect.

Any suggestions on where to look for the problem?   I tried to set a
watchpoint on the array, but since it still exists, it doesn't seem to get
hit.  How can I detect when the objects are getting deleted in Xcode?

Both the primary and secondary windows are connected to the controller in
Interface Builder.

Thanks In Advance,
Dean
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to