• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[NSMatrix putCell:] raising an exception
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[NSMatrix putCell:] raising an exception


  • Subject: [NSMatrix putCell:] raising an exception
  • From: Stephan Burlot <email@hidden>
  • Date: Thu, 18 Nov 2004 00:35:41 +0100

Hi,

I'm stomped by a bizarre bug:
I have a custom class of NSMatrix, which contains subclass of NSImageCell.
When I want to update a cell, I call a function which allocates a new cell with the new params and replace the old one with:


// over simplified code
	theCell = [pixMatrix cellAtRow:row column:column];
	matrixCell = [[CMCell alloc] init] autorelease];
	[pixMatrix putCell:matrixCell atRow:row column:column];

with row = 0, column = 0, theCell and matrixCell are not NULL.

I get an exception:
2004-11-18 00:06:08.779 ColorMailer[8807] *** *** Selector 'focusRingType' sent to dealloced instance 0x3e37a0 of class CMCell.


in gbd, 0x3e37a0 is theCell.

This happens ONLY if:
- there is only one cell in the matrix
- and this is called after a modal window (runModalForWindow) was displayed on screen.


In all other cases, it works.
It seems like *something* needs to be updated in response to the dismissal of the modal window.


(gdb info below, if needed)
Any ideas?

Thanks,
Stephan


(gdb) info stack
#0 0x90aaaba0 in -[_NSZombie methodSignatureForSelector:] ()
#1 0x909fcea0 in -[NSObject(NSForwardInvocation) forward::] ()
#2 0x90836810 in _objc_msgForward ()
#3 0x92e413a8 in -[NSControl focusRingType] ()
#4 0x92e2e7d0 in -[NSView(NSInternal) _effectiveFocusRingType] ()
#5 0x92e55734 in -[NSView setKeyboardFocusRingNeedsDisplayInRect:] ()
#6 0x92f0077c in -[NSMatrix _setNeedsDisplayInRow:column:] ()
#7 0x92e95b44 in -[NSMatrix updateCell:] ()
#8 0x92eda008 in -[NSMatrix putCell:atRow:column:] ()
#9 0x004b35f8 in -[CMController updateCell:withPhoto:] (self=0x54d520, _cmd=0x4b8e98, theCell=0x5e3cf0, photo=0x511e60) at /Users/stephan/develop/cocoa/ColorMailer/sources/CMController.m:660
#10 0x004b2b40 in -[CMController showCroppingPanel:] (self=0x54d520, _cmd=0x4b8f30, sender=0x54d520) at /Users/stephan/develop/cocoa/ColorMailer/sources/CMController.m:469
#11 0x004b36dc in -[CMController cropAfterDoubleClick] (self=0x54d520, _cmd=0x4b8e80) at /Users/stephan/develop/cocoa/ColorMailer/sources/CMController.m:677


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: [NSMatrix putCell:] raising an exception
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: Re: HTML Parsing in Objective-C?
  • Next by Date: RE: Multi-Page TIFF routine
  • Previous by thread: Re: Drag and drop file problems
  • Next by thread: Re: [NSMatrix putCell:] raising an exception
  • Index(es):
    • Date
    • Thread