排序的NSScrollView,NSTableView的内容,在ArrayController使用绑定 [英] Sort the contents of an NSScrollView, NSTableView, using Binding in ArrayController

查看:131
本文介绍了排序的NSScrollView,NSTableView的内容,在ArrayController使用绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 NSScrollView 至极,必然与 ArrayController 。我需要的内容按字母顺序排序。我试着绑定要做到这一点,但我无法找到绑定正确的事情。我用下面的 sortDescriptor 我的 ArrayController

I have an NSScrollView wich is bound with an ArrayController. I need to sort the content alphabetically. I've tried to do this with bindings but I can't find the right thing to bind. I used the following sortDescriptor on my ArrayController.

[myArrayController setSortDescriptors:[NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"myKey" ascending:YES selector:@selector(compare:)]]];

我怀念在这个过程中的一个步骤还是我甚至还没有接近排序的内容?

Do I miss a step in the process or am I not even close to sorting the content?

推荐答案

请检查该的项目 ...它使用阵列控制器,并没有搜索和排序。没有太多的codeS,使用绑定。

Please check this project...which uses array controller and does searching and sorting. Without much codes, uses Bindings.

这篇关于排序的NSScrollView,NSTableView的内容,在ArrayController使用绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆