Re: Computed Columns in NSTableView
Re: Computed Columns in NSTableView
- Subject: Re: Computed Columns in NSTableView
- From: Mike Ferris <email@hidden>
- Date: Mon, 21 Jun 2004 07:44:21 -0700
I would suggest changing from NSDictionaries to a specific model
object. Then you can implement a -size method that does the right
thing and bind to it like any other key...
Mike
Begin forwarded message:
>
From: "Gerriet M. Denkmann" <email@hidden>
>
Date: June 21, 2004 5:27:16 AM PDT
>
To: email@hidden
>
Subject: Computed Columns in NSTableView
>
>
I have a NSTableView which is bound to some NSArray which contains
>
NSDictionaries, which have keys "Width" and "Height".
>
>
But I would like to have another column called "Size" which should
>
contain Width * Height.
>
>
But there is no key in my NSDictionary called "Size", rather I would
>
like to compute it (trying not to store redundant data).
>
>
Is there a way to do this? Bind the Size-column to some method named
>
"size"? If yes, how would this method know which NSDictionary it has
>
to take?
>
>
It seems that the bindings are really powerful (and save a lot of
>
coding) but they exceed the narrow limits of my understanding.
>
>
Any help?
>
>
Gerriet.
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.