Re: CoreData issue
Re: CoreData issue
- Subject: Re: CoreData issue
- From: Patrick Perroud <email@hidden>
- Date: Thu, 7 Sep 2006 14:13:10 +0200
On 6 Sep 2006, at 19:04 , Andrew Merenbach wrote:
Hi, Patrick.
Core Data employs NSSets, rather than NSArrays, to store the
contents of NSArrayControllers. This is why you will need
NSSortDescriptors to sort your data. I suggest checking out the
docs for those, which will come in very handy for your purposes.
(Without them your data will just be returned in an essentially-
arbitrary order.)
Hope this helps,
Andrew
>
Thank you Andrew for your interesting answer, but I'm not so sure I
could follow you in here.
In short - my example was not so good since it was giving you the
impression that my list was sorted in the first place, but it was not.
So I don't see how setting an ascending or descending sorting key
would solve this issue: I just need to fetch the oiginal data in its
original unsorted order.
And adding a sorting key would only increase the confusion to me.
I mean: 3 rows reading 321, 123 and 231 are not sorted - if they were
written/read sorted ascendingly then the new sorted order would read
123, 231 and 321, which is different from the original order obviously.
In conclusion, if CoreData was not saving NSArrays in their stack
order but randomly then this would be a serious misconception, to me.
The funny part is that Apple's tutorial at http://developer.apple.com/
cocoa/coredatatutorial/index.html is just doing this and it works
just fine with them: I just don't know how they could get it sorted
in its original order in their tutorial movie...
Best regards
Patrick Perroud
On 6 Sep 2006, at 09:49, Patrick Perroud wrote:
Hello,
I'm quite new to CoreData and keen to grasp it in depth.
Testing it around from a while I came thu a strange issue I was
not able to solve by myself so far.
In short - I have 2 bound listboxes within a document window:
getting 3 rows in list 1 that reads "1.0", "2.0" and "3.0".
When first row is selected - I get 3 rows in list 2 that reads
"MSG 1", "MSG 2" and "MSG 3".
All UI - etc - is working fine.
But when I save it to binary file - then re-open the saved data,
list 1 reads "3.0", "1.0" and "2.0".
And selecting the 2nd row (that now reads "1.0"), list2 rows now
reads "MSG 2", "MSG 1" and "MSG 3".
IOW - it doesn't fetch back the 2 lists data in same order.
I have checked carefully my bindings and didn't find nothing that
would explain such an error, so I must be missing something
important in here.
Any comment and advice about such an issue would be very much
welcomed indeed.
Best regards
Patrick Perroud
- - - - - - - - -
http://p.perroud.free.fr/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40ucla.edu
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden