Mathieu Tozer's Dev Blog

Cocoa, the development of Words, and other software projects (including those dang assessment tasks).




Words: Milestone. Basic Manual and Smart Grouping System Implemented


E-mail this post



Remember me (?)



All personal information that you provide here will be governed by the Privacy Policy of Blogger.com. More...



Yaaaaahoooo!

I've integrated subproject Groups into the main pproject Words.

Had one hiccup, and I spent WAY too much time on it before going to google, where I found this apple documentation, right in the Core Data trouble shooting section. I had the intuition to know it was something to do with the Model.

Anyway, I found the following:
-_-_-_-
Cannot create new objects with array controller
Problem: You cannot create new objects using an NSArrayController. For example, when you click the button assigned to the add: action, you get an error similar to the following:
2005-05-05 12:00:)).000 MyApp[1234] *** NSRunLoop

ignoring exception 'Failed to create new object' that raised

during posting of delayed perform with target 123456

and selector 'invokeWithTarget:'

Cause: In your managed object model, you have probably specified a custom class for the entity, but you have not implemented the class.
Remedy: Implement the custom class, or specify that the entity is represented by NSManagedObject.

-_-_-_-

Which was exactly my problem.
I read it carefully, but already knew what my problem was. Since I had tested and could create Languages and groups if the array controllers managed NSManagedObjects, I could tell there was something up with the custom classes. They weren't being included in the target or something... turns out I wasn't even COMPILING them. So of course I was getting stupid errors.

Anyway the good news is that it seems to work pretty well. Every thing has slotted together and I can import lots of words at once, and see them in my library, and divvey them up in manual groups and.

Standby for some delicious screenshots :-)
Piq_060818_111236_83_Words.jpg
This is a screen with a perfectly pedestrian list of words containted within the manual group called "Word of the Day".

Piq_060818_111253_86_Words.jpg
And by setting a simple predicate to the smartgroup, we can automagically specify whichever words we want to see!

Still left to do is write my weekly reports, which the blog should make relatively painless, but that still is something that remains to be seen.

I am going to try out use case, test driven development as a means to creating healthier code which breaks less, and when it does, I know why.

There are still things to implement with regard to smart groups. Right now it's hard to tell which is smart and which is dumb in the list, so it would be nice to have an icon. It would also be sweet if the list was ordered nicely. But that's all UI stuff. The model works! The model works! Yippeee!!

Uh, of course I KNEW it would word, just for the record :D


0 Responses to “Words: Milestone. Basic Manual and Smart Grouping System Implemented”

Leave a Reply

      Convert to boldConvert to italicConvert to link

 


+RSS | dev blog | Portfolio

About me

My status

Previous posts

  • my del.icio.us
  • my flickr