Skip navigation.
 
mlRe: index out of bounds
FROM : Sherm Pendley
DATE : Wed Jul 05 08:33:24 2006

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

> 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?


Are you using bindings? If so, you can bind the button's "enable" 
property to the array controller's "canRemove" key. In addition to 
avoiding the problem, it gives the user positive feedback; the delete 
button will only "light up" when something is selected.

sherm--

Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org

Related mailsAuthorDate
mlindex out of bounds Rex Fernando Jul 5, 07:32
mlRe: index out of bounds Chris Suter Jul 5, 07:49
mlRe: index out of bounds Sherm Pendley Jul 5, 08:33
mlRe: index out of bounds Julio Cesar Silva… Jul 5, 14:15
mlRe: index out of bounds Steve Bird Jul 5, 15:08
mlRe: index out of bounds Daniel Jalkut Jul 6, 19:22
mlRe: index out of bounds Steve Christensen Jul 6, 22:00
mlRe: index out of bounds I. Savant Jul 7, 14:41