Re: Custom NSFormatter classes

2010-01-04 Thread Matthew Lindfield Seager
On Tuesday, January 5, 2010, Henri Häkkinen wrote: > Thanks for your answer again, Patrick. > > By the way, what is the general opinion about the Cocoa Bindings technology > among Mac developers? Don't confuse my uninformed opinion with the general opinion but it appears to be an 80% technology.

Re: Custom NSFormatter classes

2010-01-04 Thread Henri Häkkinen
Thanks for your answer again, Patrick. By the way, what is the general opinion about the Cocoa Bindings technology among Mac developers? I have been looking into it lately and while it looks very neat I have found it troublesome to actually put it into practical use. I am contemplating whether

Re: Custom NSFormatter classes

2010-01-04 Thread Patrick Mau
Hallo Henri I have updated the Formatter to include a context menu for the TableView. http://public.me.com/pmau Since you don't know the target, you could wire them up to the FirstResponder object in IB. Look at the inspector panel for FirstResponder, you can add actions there. Since the TableV

Re: Custom NSFormatter classes

2010-01-04 Thread Henri Häkkinen
Hello again Patric and others. I have another question related to the previous one. I now have the following things: * Foo model class * FooFormatter class which converts Foo objects into string representations * User interface with NSTableView which uses the FooFormatter in a text field cell W

Re: Custom NSFormatter classes

2010-01-03 Thread Henri Häkkinen
Hello Patric. I was able to get the NSFormatter subclass to work properly by ignoring all non-Foo objects sent to it. The Cocoa docs are indeed lacking in this respect as there is no mentioning that the cell's title will first be sent. To me this feels a bit odd anyway since I can think of no r

Re: Custom NSFormatter classes

2010-01-03 Thread Patrick Mau
Hallo Henri Your assumption about how formatters should work are correct. To provide a useful answer I have setup a mini project here, because I have stumbled over a detail I did not now: http://public.me.com/pmau I took your approach and implemted a minimal datasource and a "Foo" object. This

Custom NSFormatter classes

2010-01-02 Thread Henri Häkkinen
Hello. I have an array of custom Foo objects which I would need to display in an NSTableView object. I implement the data source delegate like this: - (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView { return [arrayOfFoos count]; } - (id)tableView:(NSTableView *)tableView ob