• 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
NSView -setHidden: and Jaguar Compatibility
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSView -setHidden: and Jaguar Compatibility


  • Subject: NSView -setHidden: and Jaguar Compatibility
  • From: Daniel Todd Currie <email@hidden>
  • Date: Mon, 15 Dec 2003 21:10:50 -0800

I have created an application that uses panther's new NSView -setHidden: method to show/hide various elements of the interface. I'm now toying with the idea of Jaguar compatibility. I've been told that NSView's -addSubview: and -removeFromSuperview methods should adequately replace the -setHidden: method if used properly. Here is my implementation:

[someView setHidden:YES];

is changed to:

[someView retain];
[someView removeFromSuperview];

and

[someView setHidden:NO];

is changed to:

[superView addSubview:someView];
[someView release];

I've already verified that superView is referring to the correct view for each view that I am hiding/showing.

The problem is that my app crashes immediately after -awakeFromNib completes. The debugger is not very helpful as the crash is occurring outside of my project source files. Here is the crash report; I can't make heads or tails of it.

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_INVALID_ADDRESS (0x0001) at 0x68696f82

Thread 0 Crashed:
#0 0x9083122c in objc_msgSend (objc_msgSend + 12)
#1 0x92dc4f58 in -[NSView _regionForOpaqueDescendants:forMove:] (-[NSView _regionForOpaqueDescendants:forMove:] + 128)
#2 0x92dc52f8 in -[NSView _regionForOpaqueDescendants:forMove:] (-[NSView _regionForOpaqueDescendants:forMove:] + 1056)
#3 0x92e1ec94 in -[NSThemeFrame _regionForOpaqueDescendants:forMove:] (-[NSThemeFrame _regionForOpaqueDescendants:forMove:] + 72)
#4 0x92e69470 in -[NSFrameView _resetDragMargins] (-[NSFrameView _resetDragMargins] + 204)
#5 0x92e2bde8 in -[NSThemeFrame _resetDragMargins] (-[NSThemeFrame _resetDragMargins] + 168)
#6 0x92ddf1f8 in _handleWindowNeedsDisplay (_handleWindowNeedsDisplay + 336)
#7 0x90191ed0 in __CFRunLoopDoObservers (__CFRunLoopDoObservers + 404)
#8 0x9019176c in __CFRunLoopRun (__CFRunLoopRun + 396)
#9 0x901960bc in CFRunLoopRunSpecific (CFRunLoopRunSpecific + 328)
#10 0x927d5ecc in RunCurrentEventLoopInMode (RunCurrentEventLoopInMode + 172)
#11 0x927dc5b8 in ReceiveNextEventCommon (ReceiveNextEventCommon + 244)
#12 0x927fe6d0 in BlockUntilNextEventMatchingListInMode (BlockUntilNextEventMatchingListInMode + 96)
#13 0x92dd2a80 in _DPSNextEvent (_DPSNextEvent + 384)
#14 0x92de93fc in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 116)
#15 0x92dfd730 in -[NSApplication run] (-[NSApplication run] + 540)
#16 0x92eb9a1c in NSApplicationMain (NSApplicationMain + 464)
#17 0x00008078 in main (main.m:13)
#18 0x00007d70 in _start (crt.c:267)
#19 0x00007be4 in start (start + 48)

Thanks in advance for any help/hints.

// Daniel Currie
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Using Authorization Services with a Factored Application
  • Next by Date: Testing NSLineBreakByTruncatingTail
  • Previous by thread: NSFormatter degates (was textShouldEndEditing Issues)
  • Next by thread: A little Advice about Recording informations in XML.
  • Index(es):
    • Date
    • Thread