How to use NSSortDescriptor

Ask a question here. It may wind up in the FAQ on the plugin homepage.
pistoleta
Posts: 16
Joined: Fri Nov 06, 2020 12:11 pm

How to use NSSortDescriptor

Post by pistoleta »

Hello I'm trying to create a query sorting by one field and I've seen you have the class NSSortDescriptor for it,
but it asks for a NSCoder that I dont know where I should take from, and I cannot create neither.
Could you give some details of how to proceed on this?
Thanks

admin
Site Admin
Posts: 49
Joined: Thu Mar 19, 2020 8:52 pm

Re: How to use NSSortDescriptor

Post by admin »

OH man, you are really exploring all the options in this API aren't you? =)

Yeah, you've hit a part of the plugin that isn't implemented. I figured no one would want to use it when it's easy enough to sort the records in C#. However, that would generate more marshaling overhead that would really be needed. So I see the appeal of using the sort descriptor to ensure that the records are in the proper order before they are sent up to the callback. I'll see what I can do about implementing the constructor for the sort descriptor and update the plugin for you.

pistoleta
Posts: 16
Joined: Fri Nov 06, 2020 12:11 pm

Re: How to use NSSortDescriptor

Post by pistoleta »

Thanks, we really need it since we are creating sort of a top high score, (with different data as score to sort) and from there we want to access other public records related to that one.

Post Reply