开发者

(Compound) Predicate Builder in Xcode 4 -- Where is it?

First off, this question is closely related to Graphical Predicate Builder in Xcode 4 With Core Data. However, I don't have a high enough rating to comment yet, and since I have no answer to offer, I'm asking a new question with much more specific detail.

I've been banging my head against the wall here, so I'm going to provide as much detail as I can...

The problem: The apple Core Data documentation is still referencing Xcode 3 and shows a highly sophisticated graphical predicate builder for Fetched Properties and Fetch Request Templates. This includes the ability to graphically create compound predicates of arbitrary complexity, for example:

(Compound) Predicate Builder in Xcode 4 -- Where is it?

This is obviously a very powerful tool for effectively using Core Data, and as far as I (and others) can tell, this functionality is either lost or impressively hidden away in Xcode 4.

Now, based on the above-linked SO question, we at least know that in XCode 4 if you add a Fetch Request:

(Compound) Predicate Builder in Xcode 4 -- Where is it?

You can subsequently access a very basic graphical predicate editor in the pane to the right:

(Compound) Predicate Builder in Xcode 4 -- Where is it?

But this graphical editor provides none of the sophisticated complexity indicated in the apple documentation (again apparently still tied to XCode 3). And, also as mentioned in the other SO question, this still doesn't answer the question of how to access any sort of graphical predicate builder for Fetched Properties.

As far as I can tell, if you add a Fetched Property, it appears in your Core Data editor, but offers no way to access the predicate builder. To expand:

In Xcode 3 the detail pane offered an "Edit Predicate" button that opened the Predicate Builder:

(Compound) Predicate Builder in Xcode 4 -- Where is it?

Here is the comparable view in XCode 4:

(Compound) Predicate Builder in Xcode 4 -- Where is it?

As can be seen, there is no "Edit Predicate" button.

The Question(s):

1) Where 开发者_Go百科are all these features in XCode 4? As shown above, the only thing even approaching a Predicate Builder I've found thus far is the very simple Fetch Request editor, which offers no compound/complex predicate abilities that I've been able to find.

And again, I want to be clear here: Unless I'm missing something obvious, this simple FetchRequest editor that appears in XC4 when you create a Fetch Request is not the answer to this question. The only conditional option it gives you is to chose whether [None/All/Any] of the following are true. This doesn't even approach the functionality of XCode 3's Predicate Builder, with complex relationships and optional variables, etc.

2) Same question, also and specifically for Fetched Properties.

I'm operating under the assumption that Apple didn't just remove the ability to graphically create sophisticated compound predicates in XCode 4, for both Fetched Properties and Fetch Request Templates. But I'm at the end of my rope trying to figure out where it's all hiding...

Thanks in advance.


Hold down the option key when using the predicate builder in Xcode 4. The + on the right will change to ... and will allow you to add additional sub-predicates. The arbitrary complexity is still there; it's just accessed differently.

Edit: It appears that in Xcode 4, the graphical predicate editor is only available for saved fetch requests, not fetched properties. For fetched properties, it looks like you just have to type out the predicate manually right now.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜