• 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: Custom EOSortOrdering for a WODisplayGroup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom EOSortOrdering for a WODisplayGroup


  • Subject: Re: Custom EOSortOrdering for a WODisplayGroup
  • From: Paul Hoadley <email@hidden>
  • Date: Fri, 7 May 2010 17:50:56 +0930

On 07/05/2010, at 4:01 PM, Johann Werner wrote:

>>> 2.  Change the Java type of that attribute to some custom type (that presumably includes a String by composition), implement the sorting algorithm for that type, and register that for global use as described.  (Is that even feasible?  Sounds like a lot of work.)
>>
>> I think I could make a good case for that being the right answer.  Maybe not the easy answer, but right.
>
> I would consider that option too. You have to bear in mind that if you change the comparator globally for all String objects you can considerably slow down your app if you are doing expensive things like using pattern matching and all that kind of stuff, especially when working with big arrays. Though it could be negligible in a small app.
> I think the ideal implementation would be to keep the normal String prototype in your model (as your model could be reused in other apps that don't need the custom sorting) and change it programmatically to your custom subclass of String in the constructor/initializer of your custom comparator.

Thanks for this.  Thanks to all who replied—very helpful.


--
Paul.

http://logicsquad.net/


 _______________________________________________
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

References: 
 >Custom EOSortOrdering for a WODisplayGroup (From: Paul Hoadley <email@hidden>)
 >Re: Custom EOSortOrdering for a WODisplayGroup (From: Johann Werner <email@hidden>)
 >Re: Custom EOSortOrdering for a WODisplayGroup (From: Paul Hoadley <email@hidden>)
 >Re: Custom EOSortOrdering for a WODisplayGroup (From: Timo Hoepfner <email@hidden>)
 >Re: Custom EOSortOrdering for a WODisplayGroup (From: Paul Hoadley <email@hidden>)
 >Re: Custom EOSortOrdering for a WODisplayGroup (From: Chuck Hill <email@hidden>)
 >Re: Custom EOSortOrdering for a WODisplayGroup (From: Johann Werner <email@hidden>)

  • Prev by Date: Even script validation return false, action method of AjaxSubmitbutton is executed
  • Next by Date: WONoVA ERModernDirectToWeb Video by David LeBer!
  • Previous by thread: Re: Custom EOSortOrdering for a WODisplayGroup
  • Next by thread: Re: Custom EOSortOrdering for a WODisplayGroup
  • Index(es):
    • Date
    • Thread