Mathieu Tozer's Dev Blog

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




Dictionaries with a checkbox to set relationships up.


E-mail this post



Remember me (?)



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



I've run into a bit of trouble with implementing this drag and drop interface for dictionaries, and I think it has to do with the limitations of bindings and core data.

But I just had a thought...

Wouldn't it be better to just have a checkbox to indicate which dictionaries are 'active' or not? This is probably better UI and it's certainly going to be easier to implement too!

But it has been good to fiddle around with this because I've learnt about how the drag and drop mechanism works, and how I can set it up with my other tableViews in the future.

Is setting a relationship the only way to go about it? Is it the best way? Why not have the system merely go though the whole list? There would be less processing and room for error if I set the relationship, and it also ties the dictionary object to a particular language, which is what I want.

The arrayController says, give me all dictionaries for THIS language. The model objects themselves know which language they are applicable to (by language name KVO) and they also know in their model if they are 'in use' or not.

Ok it's talken an afternoon but I think I can see this working.

In fact I got right down into the debugger MAKING SURE that what I thought was happening was actually happening. Asking it things like [[languageController selectedObjects] objectAtIndex:0] which help with seeing whether core data relationships are being set and removed as I want them to.

Going to go to the gym now for a bit of physical activity :-)

Then back to it!


0 Responses to “Dictionaries with a checkbox to set relationships up.”

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