Re: Cocoa-dev Digest, Vol 4, Issue 1015

  • On Oct 15, 2007, at 12:03 PM, <cocoa-dev-request...> wrote:

    > Date: Mon, 15 Oct 2007 11:17:19 -0700
    > From: Steve Checkoway <s...>
    > Subject: Re: Binding NSPopupButton crashes
    > To: "I. Savant" <idiotsavant2005...>
    > Cc: cocoadev Mail <cocoa-dev...>
    > Message-ID: <4713AEAF.80302...>
    > Content-Type: text/plain; charset=ISO-8859-1; format=flowed
    >
    > I. Savant wrote:
    >>> I am trying to bind an NSPopupButton to the user defaults in
    >>> Interface
    >>> Builder as well as programatically binding a property in another
    >>> class
    >>> to the same user default value. The NSPopupButton is in the
    >>> preferences window for the application.
    >>
    >> You're going to have to be *way* more specific. What properties of
    >> the button are you binding? To what controller and key? What code are
    >> you using when establishing the binding programatically? What does
    >> the
    >> stack trace look like? Are you really trying to establish the same
    >> binding both with Interface Builder and programmatically (or have I
    >> simply misunderstood)? If so, why do you feel that's necessary?
    >
    > I've noticed that too specific gets no responses on this list. See my
    > previous unanswered query, for an example. =) That said, here's some
    > more information.
    >
    > The part of my text you quoted says that I'm binding a property in
    > another class to the user default value, so no, I'm not doing the same
    > binding in both IB and programatically.
    >
    > In IB, I'm binding the selected value of the popup button to the
    > shared
    > user defaults controller with the key path "values.foo".
    >
    > Programatically, I have the following.
    >
    > NSUserDefaultsController *defaultsController =
    > [NSUserDefaultsController
    > sharedUserDefaultsController];
    >
    > [object bind:@"foo"
    > toObject:defaultsController
    > withKeyPath:@"values.foo"
    > options:nil];
    >
    > I'm afraid I can't give you the stack trace right now because that
    > computer is sleeping and I don't have the time to recreate it this
    > moment, but if you really think it'd be useful, I can do it when I go
    > home in the evening.
    >
    > --
    > Steve Checkoway
    >

    Your extended description here helps. But the stacktrace or at least
    the specific exception and exception message would be needed to
    remotely diagnose the problem.
previous month october 2007 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