Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

GeeYouEye

macrumors 68000
Original poster
Dec 9, 2001
1,669
10
State of Denial
The Interface: (the non-thumbnail image)
The data:
Code:
@interface Job : NSObject {
NSMutableArray * drainboards; //Yes, I'm allocating memory for it in -init
...
}
@property (retain) NSMutableArray *drainboards;
@end
@implementation Job
@synthesize drainboards;
The bindings: (images 2-4)
The explanation: In the left table column in the first image, I mean to have all of the drainboard names in a popup menu in each row. In the right column, a quantity. The drainboard objects are Core Data managed objects, but each row should represent a dictionary(keys: drainboard, quantity), which are contained by the NSMutableArray above. The array controller for the table columns is set to generate NSMutableDictionarys (in the attributes inspector pane), and its Content Array binding is set to Job.self.drainboards.

The problem: I can add and remove blank rows, but clicking the popup button cell does nothing - no menu with the drainboard names appears. If I try to set a quantity, I get this in stderr
Code:
 ** -[NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance 0x16563eb0
.

Thoughts? Some Core Data or bindings caveat I'm missing? Help!
 

Attachments

  • Picture 9.png
    Picture 9.png
    10 KB · Views: 679
  • Picture 10.png
    Picture 10.png
    155.2 KB · Views: 190
  • Picture 11.png
    Picture 11.png
    105 KB · Views: 96
  • Picture 12.png
    Picture 12.png
    139.3 KB · Views: 96
Found part of it; Prepares Content was not checked. The problem now is, instead of drainboard.name(s) in the popup menu, I get:

<NSManagedObject: 0x1b0cf0> (entity: CCCEDrainboard; id = 0x171290 <x...CEDrainboard/p104; data: { name = "Double Slope"; price = 300 }

If I bind the column to arrangedObjects.price rather than arrangedObjects.name, I get just the price. Is "name" a reserved word?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.