[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
NSArrayController troubles
- Subject: NSArrayController troubles
- From: robertcerny at mac.com (Robert Cerny)
- Date: Wed Mar 3 13:08:55 2004
Hi folks,
I'm trying to implement bindings into already finished application and
have got two problems:
a] Exception raised during posting of notification. Ignored.
exception: *** -[NSCFArray objectAtIndex:]: index (-1) beyond bounds
(0)
I created a model, which contains just NSString *name variable.
Following the samples from Apple and mmalc I made it an object class
name of NSArrayController. I also added "Add" and "Remove buttons" but
get an exception them. The exception is raised after clicking the first
row of table.
b] I'm not really sure how to combine datasource and binding. I have
some data coming from directory enumerator, which runs in the second
thread. How can I use it as an source for NSArrayController? I checked
the docs, and - (void)addObjects:(NSArray *)objects looks like a good
candidate, but am I right?
Thanks a lot
Robert