Xcode 4 中的(复合)谓词生成器——它在哪里?

发布于 2024-11-26 14:41:22 字数 1768 浏览 0 评论 0原文

首先,这个问题与

我一直在这里用头撞墙,所以我将提供尽可能多的细节...

问题:苹果核心数据文档仍然引用 Xcode 3 并显示高度复杂的图形 用于获取属性和获取请求模板的谓词构建器。这包括以图形方式创建任意复杂度的复合谓词的能力,例如:

在此处输入图像描述

这显然是一个非常强大的功能有效使用核心数据的工具,据我所知(和其他人)可以看出,这个功能要么丢失了,要么在 Xcode 4 中被令人印象深刻地隐藏起来。

现在,基于上面链接的 SO 问题,我们至少知道在 XCode 4 中如果添加 Fetch Request:

在此处输入图像描述

您随后可以在右侧窗格中访问非常基本图形谓词编辑器:

<图片src="https://i.sstatic.net/nvktc.png" alt="在此处输入图像描述">

但是这个图形编辑器没有提供苹果文档中指出的复杂性(再次强调)显然仍然与 XCode 3 相关)。而且,正如另一个 SO 问题中提到的,这仍然没有回答如何访问“任何”类型的获取属性的图形谓词构建器的问题。

据我所知,如果您添加一个获取的属性,它会出现在您的核心数据编辑器中,但无法提供访问谓词构建器的方法。展开:

在 Xcode 3 中,详细信息窗格提供了一个“编辑谓词”按钮,可打开谓词生成器:

在此处输入图像描述

这是 XCode 4 中的类似视图:

在此处输入图像描述

可以看出,有是没有“编辑谓词”按钮。

问题:

1) XCode 4 中的所有这些功能都在哪里?如上所示,到目前为止,我发现的唯一接近谓词生成器的东西是非常简单的 Fetch Request 编辑器,它不提供我能够找到的复合/复杂谓词功能。

再次,我想在这里澄清:除非我遗漏了一些明显的东西,否则当您创建 Fetch Request 时 XC4 中出现的这个简单的 FetchRequest 编辑器不是这个问题的答案。它为您提供的唯一条件选项是选择以下条件的[无/全部/任意]是否为真。这甚至没有接近 XCode 3 的谓词生成器的功能,具有复杂的关系和可选变量等。2

)同样的问题,也专门针对获取的属性。

我的假设是,Apple 不仅仅删除了在 XCode 4 中为获取的属性和获取请求模板以图形方式创建复杂复合谓词的功能。但我已经束手无策,试图找出它藏在哪里……

提前致谢。

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:

enter image description here

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:

enter image description here

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

enter image description here

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:

enter image description here

Here is the comparable view in XCode 4:

enter image description here

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

The Question(s):

1) Where 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

屌丝范 2024-12-03 14:41:22

在 Xcode 4 中使用谓词构建器时按住 option 键。右侧的 + 将更改为 ...,并允许您添加其他子谓词。任意的复杂性仍然存在;只是访问方式不同而已。

编辑:在 Xcode 4 中,图形谓词编辑器似乎仅适用于保存的提取请求,不适用于提取的属性。对于获取的属性,看起来您现在只需手动输入谓词即可。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文