Como determinar se um usuário rolou até o final de um NSTableView
Eu tenho um NSTableView e gostaria de saber quando o usuário rolou para baixo, para que eu possa executar uma ação. Não sabe ao certo como fazer isso?
UPDATE: Aqui está como eu estou calculando a parte inferior da tabela:
-(void)tableViewDidScroll:(CPNotification) notification
{
var scrollView = [notification object];
var currentPosition = CGRectGetMaxY([scrollView visibleRect]);
var tableViewHeight = [messagesTableView bounds].size.height - 100;
//console.log("TableView Height: " + tableViewHeight);
//console.log("Current Position: " + currentPosition);
if (currentPosition > tableViewHeight - 100)
{
console.log("we're at the bottom!");
}
}