• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bug in NSArray et. al. ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in NSArray et. al. ?


  • Subject: Re: Bug in NSArray et. al. ?
  • From: Johann Werner <email@hidden>
  • Date: Mon, 14 May 2018 12:17:40 +0200

Hi Markus,

aligning isEmpty to mimic count in KVC context is a logic step but I would
advise against it as changing that behavior could silently break code of many
projects.

A far better implementation could have been to route all KVC calls to the
NSArray object itself and introduce something like @items if you want the KVC
to evaluate on every contained item. At least that would be more expressive.

jm2c

jw


> Am 14.05.2018 um 10:54 schrieb Markus Ruggiero <email@hidden>:
>
> NSArray implements java.util.List
> This interface specifies the method boolean isEmpty() and NSArray correclty
> implements it.
>
> Unfortunately key-value-coding does not know about this. When using isEmpty
> in a binding (eg. WOConditional) the key "isEmpty" is not trapped but passed
> on to all the objects.
>
> isEmpty should be trapped in NSArray.java in the same way count() is handled.
>
> What do you think?
>
> ---markus---

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Bug in NSArray et. al. ?
      • From: Markus Ruggiero <email@hidden>
References: 
 >Bug in NSArray et. al. ? (From: Markus Ruggiero <email@hidden>)

  • Prev by Date: Bug in NSArray et. al. ?
  • Next by Date: Re: Bug in NSArray et. al. ?
  • Previous by thread: Bug in NSArray et. al. ?
  • Next by thread: Re: Bug in NSArray et. al. ?
  • Index(es):
    • Date
    • Thread