• 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
Randomly shuffle my core data dataset?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Randomly shuffle my core data dataset?


  • Subject: Randomly shuffle my core data dataset?
  • From: "Steven Harms" <email@hidden>
  • Date: Tue, 28 Mar 2006 04:28:04 -0800

Hi, List,

I've recently tried to get the hang of Core data and worked through
the cocoadev example where a "blog" like application is created.

I thought it would be handy to make a flash-card program for review of
concepts using Core Data.

I was able to set up the interface and data model no problem, but I
have three requirements left.

When "reviewing" the dataset (an NSArrayController manages the "cards"
entities), i must be able to shuffle the array controller.  Where can
i get a hold of the Array controller and shuffle it?  I tried on the
awakeFromNib method of the app delegate, but the entities had not yet
been loaded.  Is there a standard place to get a hold of that?

When reviewing a card, i must shuffle the four potential answers (i.e.
answer 1 must appear in TextField 4, etc.).  Again, how can i shuffle
these "potential answers".  If the screen widgets weren't "bound" I
could see the controller grabbing the contents of the 4 textfields,
randomly cycle 4 times, and thus shuffling the anwers.  Is the
fetchRequest the right place to do that?   I think it is, but i don't
see how to do it.

It must be possible to send a card to a "Wrong Answer" stack so that
you can just review your wrong cards at some later point.  Essentially
i need to be able to add a "card" to an NSArrayController.

Honestly, I don't know where to start on this problem.  I'm sorta just
into the depth of the murk here having passed the traditional tutorial
(which sets up a basic application) and trying to extend it into
something richer.

Thanks for any pointers,

Steven
 _______________________________________________
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

  • Prev by Date: Tiger's handling of encoding in RTF files
  • Next by Date: Re: Pop up window ala msn messenger
  • Previous by thread: Tiger's handling of encoding in RTF files
  • Next by thread: Re: Randomly shuffle my core data dataset?
  • Index(es):
    • Date
    • Thread