문제

나는 하나의 핵심 데이터 엔티티에서 데이터를 공급하는 방법에 익숙합니다. NSPopUpButton 항목이 다른 것을 선택할 수 있도록 항목. 그러한 바인딩 :

가치 자체 :

-> ValueSelection.Content
    Bind To: Value Source Entity
    Controller Key: arrangedObjects
    Model Key: N/A

에 표시된 값 NSPopUpButton:

-> ValueSelection.ContentValues
    Bind to: Same entity as ValueSelection.Content
    Controller Key: arrangedObjects
    Model Key: the name of the attribute you wish to have displayed

대상 값에 연결하려면 :

-> ValueSelection.SelectedObject
    Bind to: Destination entity
    Controller Key: selection
    Model Key: Name of the attribute/relationship in the destination entity.

내가하려는 것은 필터를 설정하는 방법이 있는지 알아내는 것입니다 (추측하고 있습니다. ContentValues) 특정 속성 플래그를 확인한 해당 엔티티의 항목 만 가져갈 수있는 곳 (예 : 내에서 당기고 있다고 말합니다. users 엔티티와 저는 남성 또는 여성 사용자를 나열하고 싶었습니다).

도움이 되었습니까?

해결책

nsarraycontroller는 "필터 술어", 인터페이스 빌더 또는 코드로 설정할 수 있습니다 (내가 연결 한 문서의 방법을 통해). 프로그래밍 안내서를 예비합니다 원하는 필터에 어떤 술어를 공급 해야하는지 알아 내기 위해.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top