• 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
Array exception when changing the bounds size of a view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Array exception when changing the bounds size of a view


  • Subject: Array exception when changing the bounds size of a view
  • From: "M.N.Jackson" <email@hidden>
  • Date: Thu, 1 Mar 2007 07:34:57 -0600

Hello all,

I have created a simple word processor app that has a parent view that contains WYSIWYG document pages each as individual subviews, which in turn each contain a NSTextView. When a page fill with text, the app adds another page to the parent view and resizes its the bounds and fame. When a page's text is emptied the page is removed from the parent view and resizes the bounds and frame. The pages are arranged in vertical descending order.

The problem that I have not been able to resolve is that when I remove a page, I get an exception error when reseting the bounds size. It is an NSCFArray exception, trying to access beyond the bounds of the array. The thing is, it is not in my code. It is none of my arrays that are being accessed, I can only conclude that it is an internal array in the NSView. If I add and remove pages without calling the [parentView setBoundsSize:newSize] method, I never get an exception. Also, setting the frame size doesn't cause any problems.

Has anyone experienced this problem? Any solutions or suggestions?

The exception I get in the Run Log is the following:

2007-03-01 07:25:21.874 Acts6[2899] *** -[NSCFArray objectAtIndex:]: index (1) beyond bounds (1)

The exception doesn't crash the program in debug nor when I run the executable from the finder.

Appreciate it.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Array exception when changing the bounds size of a view
      • From: Shawn Erickson <email@hidden>
  • Prev by Date: invalid CIContext with CGLContext initialization method?
  • Next by Date: help! with bluetooth code:
  • Previous by thread: invalid CIContext with CGLContext initialization method?
  • Next by thread: Re: Array exception when changing the bounds size of a view
  • Index(es):
    • Date
    • Thread