Okay, I found the issue, I'm supposed to remove the App sandboxing in the "Signings & Capabilities"
Post
Replies
Boosts
Views
Activity
Before I close this question I'd like to know if there's any way of making this work without disabling the sandbox
I'm not finding these options, I will describe the situation in more detail here:
My ViewController has the PopUpButton:
// ViewController.h
@interface ViewController : NSViewController<NSWindowDelegate, NSTableViewDataSource,
NSTableViewDelegate>
@property (weak) IBOutlet NSPopUpButton* popUpButton;
// ...
@end
Then I tried to add some object to the tableCities:
NSString* newCity = @"test";
NSString* filePath = @"/Users/eagle/Documents/cities/denver.jpeg";
NSDictionary *obj = @{@"image": [[NSImage alloc] initByReferencingFile:filePath],
@"name": newCity,
@"filePath": filePath
};
[_tableCities addObject: obj];
I just wanted my pop up button to reflect the contents of _tableCities, specifically the "@name" field.
Going back to the story board in the bindings inspector, selecting the "Bind to View Controller" checkbox makes the "Controller Key" grayed out, what gives?
Sorry if this is a dumb question but I can't for the life of me get this to work .
Edit
Please ignore the last image, here's the image showing the binding of the NSPopUpButton:
problem still persists tho
never mind, you were right, thanks
@GRALInfo just a follow up question if instead of using a dictionary , I wanted to use a custom class say:
@interface City
NSString* (copy) name1;
NSString* (copy) name2;
@end
// view controller
@property NSMutableArray<Citiy*> *cities;
would the process be the same?