FROM : Peter Ammon
DATE : Wed Jun 25 22:12:36 2008
Hi Chris,
If the holds down the option key and clicks a + button, it will insert
another compound row, so the user can make arbitrarily complex
predicates. If this doesn't seem to happen, make sure the nesting
mode is set to compound.
By default, NSPredicateEditor supports And, Or, and Not compound
types, where "Not" is interpreted as Nor, that is, "None of the
following are true".
-Peter
On Jun 25, 2008, at 7:19 AM, Chris wrote:
>
> Cool.
>
> Now I notice that if you manually plug in a complex predicate like
> "a = b or c = d and e = f", that it is capable of displaying it
> correctly.
>
> Do you know if there is any way to allow the user to create more
> complex expressions? By default it only seems to allow either AND or
> OR, but not both from the user, even though the machinery seems to
> know how to display things more complex.
>
>
>
> On 25/06/2008, at 11:57 PM, Jim Turner wrote:
>
>> On Wed, Jun 25, 2008 at 1:08 AM, Chris <<email_removed>> wrote:
>>> Let's say I create a NSPredicateEditor and it looks like this:
>>>
>>> --------------------
>>> [All] of the following are true:
>>> --------------------
>>> [Name] equals [ ]
>>> -------------------
>>>
>>> So the user enters say "Fred" and the predicate returned is "Name
>>> == Fred".
>>>
>>> Later on, I reload that predicate into the NSPredicateEditor and
>>> it looks
>>> like this:
>>>
>>> --------------------
>>> [Name] equals [ Fred ]
>>> -------------------
>>>
>>> But now there is no option to change it to say:
>>>
>>> [Some] of the following are true:
>>>
>>> because that line isn't shown.
>>>
>>> How do I make that line reappear the next time?
>>
>> By default, the NSPredicateEditor object in IB creates a compound
>> predicate. Wrap your "Name == Fred" predicate in a compound
>> predicate
>> before reloading it in the editor and the Any/All/None row should
>> return.
>>
>> --
>> Jim
>> http://nukethemfromorbit.com
>
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
DATE : Wed Jun 25 22:12:36 2008
Hi Chris,
If the holds down the option key and clicks a + button, it will insert
another compound row, so the user can make arbitrarily complex
predicates. If this doesn't seem to happen, make sure the nesting
mode is set to compound.
By default, NSPredicateEditor supports And, Or, and Not compound
types, where "Not" is interpreted as Nor, that is, "None of the
following are true".
-Peter
On Jun 25, 2008, at 7:19 AM, Chris wrote:
>
> Cool.
>
> Now I notice that if you manually plug in a complex predicate like
> "a = b or c = d and e = f", that it is capable of displaying it
> correctly.
>
> Do you know if there is any way to allow the user to create more
> complex expressions? By default it only seems to allow either AND or
> OR, but not both from the user, even though the machinery seems to
> know how to display things more complex.
>
>
>
> On 25/06/2008, at 11:57 PM, Jim Turner wrote:
>
>> On Wed, Jun 25, 2008 at 1:08 AM, Chris <<email_removed>> wrote:
>>> Let's say I create a NSPredicateEditor and it looks like this:
>>>
>>> --------------------
>>> [All] of the following are true:
>>> --------------------
>>> [Name] equals [ ]
>>> -------------------
>>>
>>> So the user enters say "Fred" and the predicate returned is "Name
>>> == Fred".
>>>
>>> Later on, I reload that predicate into the NSPredicateEditor and
>>> it looks
>>> like this:
>>>
>>> --------------------
>>> [Name] equals [ Fred ]
>>> -------------------
>>>
>>> But now there is no option to change it to say:
>>>
>>> [Some] of the following are true:
>>>
>>> because that line isn't shown.
>>>
>>> How do I make that line reappear the next time?
>>
>> By default, the NSPredicateEditor object in IB creates a compound
>> predicate. Wrap your "Name == Fred" predicate in a compound
>> predicate
>> before reloading it in the editor and the Any/All/None row should
>> return.
>>
>> --
>> Jim
>> http://nukethemfromorbit.com
>
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
| Related mails | Author | Date |
|---|---|---|
| Chris | Jun 25, 08:08 | |
| Jim Turner | Jun 25, 15:57 | |
| Chris | Jun 25, 16:19 | |
| Peter Ammon | Jun 25, 22:12 | |
| Chris | Jun 26, 04:27 | |
| Kyle Sluder | Jun 26, 14:53 | |
| Peter Ammon | Jun 27, 02:09 | |
| Chris | Jun 27, 03:48 | |
| Peter Ammon | Jul 4, 01:30 |






Cocoa mail archive

