Cocoa program problem (with picture)

Discussion in 'Mac Programming' started by kellah, Apr 8, 2008.

  1. macrumors regular

    Apr 29, 2007
    East Lansing, MI
    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?

  2. macrumors 68040


    Jan 10, 2005
    Dallas, TX
    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?

  3. Moderator emeritus


    Jun 15, 2000
    Sounds like you have the bindings setup incorrectly. See this post on how to do it.
  4. thread starter macrumors regular

    Apr 29, 2007
    East Lansing, MI
    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:

Share This Page