Questions tagged [cocoa-bindings]

Cocoa bindings is Apple’s implementation of the Model-View-Controller design pattern for Mac OS X applications. It provides technologies that automate the synchronisation of domain data and the user interface elements that present them.

975 questions
0
votes
0 answers

Cocoa binding vs. not synthesized property

In my model class there is property: @property (readwrite, nonatomic) NSString* prop; ... -(NSString*) prop { return someExternalObject.stringProp;} -(void) setProp: (NSString*) str { someExternalObject.stringProp = str;} At some moment…
brigadir
  • 6,874
  • 6
  • 46
  • 81
0
votes
1 answer

cocoa bindings with c++ libraries

Is it possible to use bindings (NSArrayController etc) if you have to have a c++ in the model, ie all files in the model have .mm extension. Have built a small test program in pure Objective-C, which works OK, but when I try to build a program with…
0
votes
1 answer

NSArrayController ignoring filterPredicate on init

Noob warning! My app displays data in a standard NSTableView via NSArrayController all via bindings. All cool. There is a filterPredicate, “completed tasks” which is toggled by a check box which drives a BOOL in the background. This works great when…
Steve
  • 93
  • 7
0
votes
1 answer

bundelPath without app name

i need to get the path of the app (bundlePath or bundleURL) without the app name NSUrl *strUrl = [[NSBundle mainBundle]bundleURL]; NSString *str = [[NSBundel mainBundel]bundlePath]; how do i go about
Jaggu
  • 25
  • 5
0
votes
0 answers

Updating controls in 2nd Window

I have two windows, 1 mainMenu and 1 window added by me i open the 2nd window after clicking on a button on mainMenu Window using myWindowController *w = [[myWindowController alloc] initWithWindowNibName:@"myWindow" owner:self]]; [w…
Jaggu
  • 25
  • 5
0
votes
1 answer

NSComboBox with bindings to NSTreeController

I have a NSTreeController/NSOutlineView with children and a NSComboBox. I would like to only show the top level objects in the combobox and not the children. Can't figure out how to do this. Any suggestions?
Mikael
  • 3,572
  • 1
  • 30
  • 43
0
votes
1 answer

KVO - problem retrieving object from storage and displaying for edition

I've a problem with KVO and I just can't find out what it is. I have a screen that can be used to edit or create a record. That record is represented by a model object that holds a number of variables of type NSString. The controller for that string…
ruipacheco
  • 15,025
  • 19
  • 82
  • 138
0
votes
1 answer

How can I link and update multiple NSSliders?

I have 3 NSSliders and NSTextFields set with bindings. Each slider represents an NSInteger value, one column is low, one column is medium and one column is high. I've set Low's max to 98, Medium's max to 99, and High's max to 100. The range of…
aroooo
  • 4,726
  • 8
  • 47
  • 81
0
votes
1 answer

Is there a way to use bindings with an editable NSSecureTextFieldCell in an NSTableView?

I have an NSTableView with several columns, one of which is set up to use an NSSecureTextFieldCell as its dataCell. I am using a properly configured NSArrayController to provide data to this table. The problem is that my secure text field does not…
e.James
  • 116,942
  • 41
  • 177
  • 214
0
votes
1 answer

Dynamic NSCombobox

I'm creating an application in which I have several entities and now I need to filter the content of third combobox dynamically. I explain myself better. I have 3 combobox (building, floor and department), I would like first to show me all the…
0
votes
1 answer

Custom NSPopUpButtonCell outlet / bindings

I'm having a problem with a custom NSPopUpButtonCell in a table that's instantiated when the table view is populated via bindings and a NSArrayController. The pop up button cell is created but when attempting to access the outlet by overriding the…
Jay
  • 6,572
  • 3
  • 37
  • 65
0
votes
1 answer

NSComboBoxCell on the list, always changing all rows

I have list of employees, created as NSTableView, with two columns. First is employee name, second is employee role, which should be selected from combo box. I added to this column NSComboBoxCell, and I set column bindings to: Content -…
Tomasz Wojtkowiak
  • 4,910
  • 1
  • 28
  • 35
0
votes
1 answer

NSPopupButton content binding to NSAttributedString

I've got a NSArrayController dynamically populating a table with a bunch of columns, one of them has a popup button. The content of the popup button cell needs to use NSAttributedString as I need to display a scientific variable with subscript (X1…
Jay
  • 6,572
  • 3
  • 37
  • 65
0
votes
3 answers

Table view not updating according to bindings

This is a very newbie question, and this is something I have done many times before, but there's something I'm missing this time. In my AppDelegate.h file I declare an NSArray and set it as a property: @interface AppDelegate : NSObject { NSArray…
indragie
  • 18,002
  • 16
  • 95
  • 164
0
votes
2 answers

How can I bind to values of NSDictionary sub-dictionaries in Cocoa?

I've a class with two properties: NSString *fileName, and NSDictionary *frames illustrated below. NSDictionary *frames key: NSString value: instance of fields dictionary NSDictionary *fields key: NSNumber (C++ enum value) value: NSValue (C++…
Matt
  • 1,041
  • 1
  • 16
  • 28