Bindings to Count Entries in a Table Column?

Can bindings be used to count how many rows of a particular column in a table have data in them? I thought that maybe I could bind the count I want to @count.whatever with a value transformer of IsNotNil but that didn’t work.

This might be a bit icky, but you could have a second array controller, use setFilterPredicate: to do the filtering, and then bind to it using @count.

Thanks Shane, that does seem a bit icky. I think I’ll stick with the few lines of code that will do the same thing.

repeat with aDict in theData
			if (aDict's allKeys() as list) contains "rainAmount" then
				set my rainyDayCount to rainyDayCount + 1 as integer
			end if
		end repeat

Ric

It might be a whisker faster to filter the array using filteredArrayUsingPredicate:, and then count the result.