View Full Version : Cocoa program problem (with picture)
Apr 9, 2008, 12:24 AM
So I made a Core Data program to keep track of my biking. I am binding an entity to the pop up box and it displays the two things I put in there. However it also displays some garbage....
How do I get rid of the garbage?
Apr 9, 2008, 12:33 AM
Given no other information I would blame an off-by-one error iterating over the choices, providing the count of items, maximum index of something, etc.
It might be best to post some code snippets. It looks like you have an array, NSArray, whatever, of strings, and something is going off of the end of it and grabbing some other memory that happens to be... wacky. Is the "Garbage" always the same?
Apr 9, 2008, 06:45 AM
Sounds like you have the bindings setup incorrectly. See this (http://forums.macrumors.com/showpost.php?p=4837770&postcount=7) post on how to do it.
Apr 9, 2008, 10:44 AM
The thing is, I haven't written a line of code. Everything I've done has been in Interface Builder. (And I created the data model)
I tried fixing the bindings as kainjow suggested. I can get the pop up button to populate the options correctly. I did this by binding Content and Content Values. However, as soon as I try to bind to my Selected object or value, that's when the garbage shows up. I've tried a slew of different bindings for the selection and I'm not quite sure what's wrong.
If someone would be willing to take a look at my project, perhaps it would be easier: www.msu.edu/~kellera8/RideLog.zip