cocoa-bindings

Key Value Bindings iPhone

I have a bunch of NSDictionaries thats stored in an NSArray. The dictionaries store coordinates for buttons, their name, and their relating object to load when pressed (UIView). When the button is pressed I can retrieve which button it is in string format, for example "settings" and I would like to then run the object -(void)settings{}....

IKImageBrowserView appears to not bind properly

Hello, my question relates to Interface Builder and an IKImageBrowserView not implementing bindings as I would expect. I have a fairly long key path to get to an NSArrayController, the contents of which I want to display in the IKImageBrowserView. This is the key path I am binding an NSTextField's Display Pattern binding to: currentOrd...

what is less resource intensive: Bindings, KVO, or Notifications

Rather than trying to run a bunch of tests. Does anybody know what is less resource intensive? Bindings, KVO, or Notifications? Has anyone tested to see as well? ...

Binding an NSMenuItem's title breaks enabled/disabled validation

I have a menu where some of the menu items use bindings to get their title. These items are always enabled, and don't neither automatically enable/disable like they should NOR do they cause a call to validateUserInterfaceItem:. If you remove the binding on title, then that starts working again. The menu items have the target set to nil (...

NSButton, binding question

Hi all, I am trying a cocoa application with core-data. The application contains an entity: UsefulUrl with attribute: url. The entered urls are displayed in table view. I am able to insert, modify and delete the entered urls from table via cocoa bindings (NSArrayController). Now, I want to open the urls of selected rows in bro...

How to set title of NSBox from an array controller via cocoa- bindings

Hi all, I have an array controller holding some values, say - subjects. I am displaying these values in a table view. I want to set the title of NSBox as subject in selected row. I tried to do it in following way: Binding pane: Title, Controller Key: selection, Model Key Path: subject. But it is always displaying nil as box title. Ca...

Objective-C/Cocoa : Using bindings to access scalar values in an array

So assume there's a class which contains: int someData[EXTREMELY_LARGE_CONSTANT]; What's the simplest way to bind arbitrary integers from this array to textfields in Interface Builder? Can I somehow read/write someData[x] through a KVC method on the class, or do I have to make a textfield subclass or something similar? ...

GCD blocks not updating NSCollectionView

I have a Cocoa app that listens for notification and posts updates to an NSMutableArray monitored by a NSCollectionView. The notifications arrive in large volumes so I was thinking to use a different queue to process them and update the array accordingly. Right now I am using addObserverForName:object:queue:usingBlock to register for no...

Implementing NSOutlineView/NSTableView with different cells (and data types) per row.

I'm wondering how one would implement an outline view like the one Xcode 3 is using for the build configuration: When using an NSOutlineView/NSTableView with bindings and an NSTreeController/NSArrayController, the view's columns get bindings assigned to, not the individual cells, for obvious reasons. If every row in a column uses the ...

nssearchfield predictate doesnt return items with spaces

ANY contains $value.lowercaseString above is the value I place into my xib's bindings search predicate. if I type in a word such as => happy it returns correctly if I type in a word such as => happy luck then my view no longer will contain the a result. even though happy luck does exist as a searchable data point. All in all it ...

Adding yourself as an observer to an array than an NSArrayController is bound to?

I have class called AppController which contains a mutable array of Person objects called people. Each person simply has an NSString and a float. I also have an NSArrayController whose contentArray is bound to the people array in AppController. Then I have the usual setup of a table view bound to the array controller to show a list of ...

Showing serial nos. in a table column using NSArrayController and cocoa bindings

Hi all, I have a simple question: How to show serial nos. or (row no. + 1) in a table column using cocoa bindings and array controller? I have made an application using cocoa bindings and array controller, in which I am displaying names of certain persons in a table column. The class from which I am displaying is named as: Perso...

Do I need two NSObjectControllers?

Hi, I'm learning about Cocoa bindings. I'm having two completely different objects, each with an iVar that I want to sync with a user interface item. But since they're two different objects and I can only have on "content" outlet with one NSObjectController, do I need another one? ...

Cocoa Bindings: Binding an NSSlider to a single value in an array

I'm working on a Cocoa application that requires several sliders that will control the values for several "channels" of data. I would like to create the the app so that all of the channel data is stored as integers in a single array. Each slider would then be bound to a single element in the array. Is this possible at all? If so do I nee...

Getting a unique identifier for each element of NSArrayController's content

I'm making a custom view that I want to be bindings/core data compatible and represent a collection of data (a la NSTableView) Is there any way my view can refer to a specific subset of the elements in the collection (other than the current selection) after a change by the user? A bit of context: The view is going to display a number o...

KVC array: getters vs indexed accessors?

I'm confused by this: http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/AccessorConventions.html#//apple_ref/doc/uid/20002174-178830-BAJEDEFB Supposing @interface Office : NSObject { NSMutableArray *employees; } What is the benefit of implementing the collection accessors? How is [anOffi...

Accessing properties of Core Data objects via bindings from non-Core Data objects

I have a set of data created by another app and stored in XML format on disk. Since this data is managed by this other app, I don't want to bother with loading this data into a Core Data store for two reasons: 1) it would be redundant storage of the same data, and 2) I would have to constantly update my own Core Data store to match upda...

Slide and Label Update

Hi. Is there a way to update a label bind to a slider while the slider is draged? I bind the label to the slider via 'takeFloatValueFrom:' but it's update the value only when i release the mouse from the slider. Thanks ...

Making a bindable view that displays/edits an array of stuff (like NSTableColumn)

I'm trying to make a view class which exposes bindings. I've got the simple case for bindings worked out: the following code exposes two bindings. As long as I make properties with the same name as the bindings, all works. + (void)initialize { if (self == [RecipeView class]) { [self exposeBinding:@"name"]; [self ...

NSOutlineView selection binding error

Hi I got the next situation: NSOutlineView <-> NSTreeController <-> MyClass I bind the NSTreeController to an array of objects in MyClass, now I want to get the selected item from the NSOutlineView. For this i declare a NSMutableIndexSet and bind it to the NSTreeController via the "Selection Index Paths" binding how is bound to the NSO...