(*Solved*) Binding Problem: Double-Click on NSTableView object creates a signal 10 (SIGBUS) error
(*Solved*) Binding Problem: Double-Click on NSTableView object creates a signal 10 (SIGBUS) error
- Subject: (*Solved*) Binding Problem: Double-Click on NSTableView object creates a signal 10 (SIGBUS) error
- From: "Frederick C. Lee" <email@hidden>
- Date: Thu, 27 Oct 2005 18:48:58 -0700
- Resent-date: Fri, 28 Oct 2005 10:36:42 -0700
- Resent-from: "Frederick C. Lee" <email@hidden>
- Resent-message-id: <email@hidden>
- Resent-to: Cocoa Developers <email@hidden>
I did a search for any replies and couldn't find any entry/reply on
Cocoa-Dev; so I posted a second time.
Then I noticed mmalcolm crawford's reply on CocoaBuilder.com
Sorry for the double posting.
Anyway...
I was missing the colon ':' from the Selector's Name. It's
*working* now.
Thanks to mmalcolm crawford's FAST reply. I feel a crack in the
proverbial brick wall!
Ric.
Greetings:
I'm working with Apple's Core Recipe example: "Example 4 - Working
With Core Data and Cocoa Bindings""
1) I've successfully built and ran a simple Chef-Recipe-Ingredient
example using Core Data + Binding code.
2) I removed the original IB objects from the window and Alt-Drag
the Chef Table (Entity) into the Window object. Again, runs okay.
2a) I now have an Instantiated "Chef" NSArrayController and a
CoreRecipesController (son of NSObject) in my IB.
Okay, all is well.
I want to add a simple double-click functionality to the
NSTableView that contains the list of Chefs. Reading the assorted
docs, it appears strait forward.
3) I select the Binding properties of the NSTableView via the
Inspector.
This is what I have:
DoubleClickArgument:
Bind To: Chef Array Controller (NSArrayController)
Controller Key: selectedObjects
Selector Name: "inspect"
DoubleClickTarget:
Bind To: CoreRecipesController(CoreRecipesController)
Controller Key: nil
Model Key Path: self
Selector Name: "inspect"
============================================================
The target:
...
...
@interface CoreRecipesController : NSObject
{
NSManagedObjectContext *managedObjectContext;
NSManagedObjectModel *managedObjectModel;
NSMutableArray *recipeArray;
IBOutlet NSWindow *mainWindow;
}
- (NSManagedObjectModel *)managedObjectModel;
- (NSManagedObjectContext *)managedObjectContext;
- (NSMutableArray *)recipeArray;
- (IBAction)saveAction:(id)sender;
- (void)inspect:(NSArray *)selectedObjects;
@end
@implementation CoreRecipesController
...
- (void)inspect:(NSArray *)selectedObjects { // via column
Binding ACTION
NSLog(@"{inspect}");
} // end inspect().
...
@end
======================================================================
==============
4) I rebuild and ran the altered example:
a) I got the Chef data displayed.
b) Double-Clicked on the NSTableView of Chefs: ****bomb****
Error:
CoreRecipesCocoaBindings has exited due to signal 10 (SIGBUS).
I followed the documentation an worked on a working example. All I
did was to add the additional double-click functionality.
Any clues to what I'm missing?
_______________________________________________
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