[Q]: Core Data & Bindings, [_NSStateMarker intValue] error

  • Hi all,

    I would appreciate any help you can give me on this - I spent ages
    trying to solve it and looked everywhere for anything that might help.

    I have an NSTableView which is bound to an NSArrayController, which
    manages a set of Core Data entities. I also have Add and Remove
    buttons, which are connected to the add: and remove: actions of the
    controller - a typical use of Core Data and Bindings.

    When I add the first entity by clicking the Add button or when
    saveAction: is called (and in other circumstances), I often get this
    error:

    2008-01-18 12:25:33.304 blogosphere[10865:10b] *** -[_NSStateMarker
    intValue]: unrecognized selector sent to instance 0x10ba60

    This error, in some cases, is not apparent to the user. In other
    cases, it stops the execution of the running method.

    I would be grateful if you could help me with this or point me to the
    right direction.

    Kind regards,

    Nick

    ____________________________________________________________
    Nick Toumpelis                        email: <nick...>
    BEng (Wales), MSc (Manchester)
    Software Developer
    Thessaloniki, Greece

    ____________________________________________________________
    Nick Toumpelis                        email: <nick...>
    BEng (Wales), MSc (Manchester)
    Software Developer
    Thessaloniki, Greece
  • You probably bind something else, probably to the selection or
    something. See the NSIsControllerMarker function. You get a state
    marker when a bound value is invalid, like nil or a multiple value.
    You should take care that your app handles this correctly when using
    a bound value.

    Christiaan

    On 19 Jan 2008, at 12:22 AM, Nick Toumpelis wrote:

    > Hi all,
    >
    > I would appreciate any help you can give me on this - I spent ages
    > trying to solve it and looked everywhere for anything that might help.
    >
    > I have an NSTableView which is bound to an NSArrayController, which
    > manages a set of Core Data entities. I also have Add and Remove
    > buttons, which are connected to the add: and remove: actions of the
    > controller - a typical use of Core Data and Bindings.
    >
    > When I add the first entity by clicking the Add button or when
    > saveAction: is called (and in other circumstances), I often get
    > this error:
    >
    > 2008-01-18 12:25:33.304 blogosphere[10865:10b] *** -[_NSStateMarker
    > intValue]: unrecognized selector sent to instance 0x10ba60
    >
    > This error, in some cases, is not apparent to the user. In other
    > cases, it stops the execution of the running method.
    >
    > I would be grateful if you could help me with this or point me to
    > the right direction.
    >
    >
    > Kind regards,
    >
    > Nick
    >
    >
    >
    > ____________________________________________________________
    > Nick Toumpelis                        email: <nick...>
    > BEng (Wales), MSc (Manchester)
    > Software Developer
    > Thessaloniki, Greece
    >
    >
    >
    >
    >
    >
    > ____________________________________________________________
    > Nick Toumpelis                        email: <nick...>
    > BEng (Wales), MSc (Manchester)
    > Software Developer
    > Thessaloniki, Greece
    >
    >
    >
    >
    >
    >
    > _______________________________________________
    > MacOSX-dev mailing list
    > <MacOSX-dev...>
    > http://www.omnigroup.com/mailman/listinfo/macosx-dev
  • Thanks for your suggestion, Christiaan.

    After searching for hours , I found the little bug(ger) somewhere I
    did not expect. Initially, I thought that it had something to do with
    the Bindings in the NIB file. It was actually in the code, at a point
    where I was observing a key path of a nil object - like you said.

    Again, thank you very much for your help,

    Nick

    On 19 Ιαν 2008, at 1:34 ΠΜ, Christiaan Hofman wrote:

    > You probably bind something else, probably to the selection or
    > something. See the NSIsControllerMarker function. You get a state
    > marker when a bound value is invalid, like nil or a multiple value.
    > You should take care that your app handles this correctly when using
    > a bound value.
    >
    > Christiaan
    >
    > On 19 Jan 2008, at 12:22 AM, Nick Toumpelis wrote:
    >
    >> Hi all,
    >>
    >> I would appreciate any help you can give me on this - I spent ages
    >> trying to solve it and looked everywhere for anything that might
    >> help.
    >>
    >> I have an NSTableView which is bound to an NSArrayController, which
    >> manages a set of Core Data entities. I also have Add and Remove
    >> buttons, which are connected to the add: and remove: actions of the
    >> controller - a typical use of Core Data and Bindings.
    >>
    >> When I add the first entity by clicking the Add button or when
    >> saveAction: is called (and in other circumstances), I often get
    >> this error:
    >>
    >> 2008-01-18 12:25:33.304 blogosphere[10865:10b] *** -[_NSStateMarker
    >> intValue]: unrecognized selector sent to instance 0x10ba60
    >>
    >> This error, in some cases, is not apparent to the user. In other
    >> cases, it stops the execution of the running method.
    >>
    >> I would be grateful if you could help me with this or point me to
    >> the right direction.
    >>
    >>
    >> Kind regards,
    >>
    >> Nick
previous month january 2008 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today