Core Data problems
-
Hi,
I have kind of a newbie question that I was hoping someone could help
me with. I'm trying to learn Cocoa/Core Data coming from a different
background and I got some help from a friend but we have struck out
and can't figure out what to do next. The idea is very simple. I want
an array of arrays of cards. The first list should list series (for
example common kanji, mayan temples, cocoa coding heroes, etc) and the
second list individual cards. Having selected a card you should be
able to edit the front and back of that card.
I have tried to click my way to a solution, so I have stayed away from
code, and if possible I would prefer a non-code based solution. I'm
half hoping to do something useful, and half hoping to learn something
from the ordeal, so "doing the right thing" is high up on my list.
You can download my project at the URI below (should help if my
explanation was too bad to follow) and if you have any questions just
shoot.
http://www.cenara.com/users/ce01724/FlashCard.zip
Cheers,
John Gustafsson -
On Thu, Feb 21, 2008 at 2:14 PM, John Gustafsson
<flexo.crashlog...> wrote:
> I have kind of a newbie question that I was hoping someone could help
> me with. I'm trying to learn Cocoa/Core Data coming from a different
> background and I got some help from a friend but we have struck out
> and can't figure out what to do next. The idea is very simple. I want
> an array of arrays of cards. The first list should list series (for
> example common kanji, mayan temples, cocoa coding heroes, etc) and the
> second list individual cards. Having selected a card you should be
> able to edit the front and back of that card.
OK, so you seem to be having a data modeling issue. First, abandon
the concept of arrays; Core Data doesn't use them, and you're really
talking about set theory, so we'll talk about sets.
So you want to have a set A of subjects. You also want a mapping F
from a subject to a set of what sound to me like flashcards. Elements
of set A are of type Subject, elements of set F(A) are of type
Flashcard. A Subject has a title, and a Flashcard has a front side
and a back side.
> From here, it should be very clear how you would model this in theCore Data model designer.
HTH,
--Kyle Sluder -
I would strongly recommend leaving Core Data alone until you're more
familiar with the rest of Cocoa. As the docs say, it makes use of many
other Cocoa technologies which are almost impossible to learn all at
once.
On 21 Feb 2008, at 19:14, John Gustafsson wrote:
> Hi,
>
> I have kind of a newbie question that I was hoping someone could
> help me with. I'm trying to learn Cocoa/Core Data coming from a
> different background and I got some help from a friend but we have
> struck out and can't figure out what to do next. The idea is very
> simple. I want an array of arrays of cards. The first list should
> list series (for example common kanji, mayan temples, cocoa coding
> heroes, etc) and the second list individual cards. Having selected a
> card you should be able to edit the front and back of that card.
>
> I have tried to click my way to a solution, so I have stayed away
> from code, and if possible I would prefer a non-code based solution.
> I'm half hoping to do something useful, and half hoping to learn
> something from the ordeal, so "doing the right thing" is high up on
> my list.
>
> You can download my project at the URI below (should help if my
> explanation was too bad to follow) and if you have any questions
> just shoot.
>
> http://www.cenara.com/users/ce01724/FlashCard.zip
>
> Cheers,
> John Gustafsson
-
I was kind of hoping to just get this simple thing going, and then I
could learn more cocoa from there. I'm quite familiar with frameworks
on the whole, but I need kind of an "in". I never could learn as well
from reading as from doing:) I was kind of hoping that this would be
quite a simple core data app after all, so that I didn't have to
venture further into core data for a while.
Anyone who could give me a hint to why the second list view isn't
working? Seems like we got the data model working quite well, we just
can't connect it :( The app really should be dead simple to fix for
someone in the know.
Cheers,
John
On 21 Feb, 2008, at 21:03, Mike Abdullah wrote:
> I would strongly recommend leaving Core Data alone until you're more
> familiar with the rest of Cocoa. As the docs say, it makes use of
> many other Cocoa technologies which are almost impossible to learn
> all at once.
>
> On 21 Feb 2008, at 19:14, John Gustafsson wrote:
>
>> Hi,
>>
>> I have kind of a newbie question that I was hoping someone could
>> help me with. I'm trying to learn Cocoa/Core Data coming from a
>> different background and I got some help from a friend but we have
>> struck out and can't figure out what to do next. The idea is very
>> simple. I want an array of arrays of cards. The first list should
>> list series (for example common kanji, mayan temples, cocoa coding
>> heroes, etc) and the second list individual cards. Having selected
>> a card you should be able to edit the front and back of that card.
>>
>> I have tried to click my way to a solution, so I have stayed away
>> from code, and if possible I would prefer a non-code based
>> solution. I'm half hoping to do something useful, and half hoping
>> to learn something from the ordeal, so "doing the right thing" is
>> high up on my list.
>>
>> You can download my project at the URI below (should help if my
>> explanation was too bad to follow) and if you have any questions
>> just shoot.
>>
>> http://www.cenara.com/users/ce01724/FlashCard.zip
>>
>> Cheers,
>> John Gustafsson
>



