Post

Replies

Boosts

Views

Activity

Reply to Binding NSPopUpButton to an NSMutableArray
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 .
Topic: UI Frameworks SubTopic: AppKit Tags:
Oct ’24
Reply to Binding NSArrayController to an NSMutableArray not working
@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?
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Binding NSArrayController to an NSMutableArray not working
never mind, you were right, thanks
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Binding NSArrayController to an NSMutableArray not working
Edit Please ignore the last image, here's the image showing the binding of the NSPopUpButton: problem still persists tho
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Binding NSPopUpButton to an NSMutableArray
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 .
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to NSDirectoryEnumerator returns nil
Before I close this question I'd like to know if there's any way of making this work without disabling the sandbox
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to NSDirectoryEnumerator returns nil
Okay, I found the issue, I'm supposed to remove the App sandboxing in the "Signings & Capabilities"
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’24