• 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
Re: index out of bounds
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: index out of bounds


  • Subject: Re: index out of bounds
  • From: Steve Bird <email@hidden>
  • Date: Wed, 5 Jul 2006 09:08:39 -0400


On Jul 5, 2006, at 1:32 AM, Rex Fernando wrote:

Hello,

I have a table with data in it. When someone clicks the remove button, I get the selection array and remove all the objects in it. If there is an empty selection, I am told index out of bounds, naturally, because there are no items in the array. Can I just leave this error? Or should I make a catch for it?


A truly Mac-like rule to follow is: don't enable the button if it won't work.

If the REMOVE button will cause an error message, then I should not be able to operate it.

I would suggest enabling/disabling the button when the selection changes.

----------------------------------------------------------------
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
www.Culverson.com                     (toll free) 1-877-676-8175


_______________________________________________ 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
References: 
 >index out of bounds (From: Rex Fernando <email@hidden>)

  • Prev by Date: Re: Single selection and bindings
  • Next by Date: Re: turning off anti-aliasing
  • Previous by thread: Re: index out of bounds
  • Next by thread: Re: index out of bounds
  • Index(es):
    • Date
    • Thread