Added: 5 months ago
From: AppleProgramming
Views: 1,935
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (13)

Sign In or Sign Up now to post a comment!
  • When i started a new project, there was no AppController.h or AppController.m so i made a new class and typed in the code in the two files as you had it. then when i went to the bindings inspector for the check box, i clicked on "Bind to:" but there was no option in the pop-up for AppController

  • @ayastona Ya the AppController is just a class I make that is a NSObject subclass, I said to make this and the object in the nib file in the early tutorials, if you see AppController you should know to do this. You are probably missing the AppController object in the nib file is my guess for why it's not showing up. Again, I showed how to do this in the first few tutorials.

  • Hi, I'm using XCode Version 4.1 and I don't have the "Binding" Inspector. How do I find the binding inspector or how do I add it to this Xcode?

  • Is it possible to do this lesson without bindings? That is can we use KVC and KVO programmatically, as you did with dog and hunger? Right now I can't see how you would use the -addObserver method with any object on the view provided by apple.

  • @1937GRUMPY I won't do one because it may as well be done using target action if that is the case. But in essence the controller class is the main piece. It observes and changes the values. It will observe the given key path, and whenever it gets notified of a change it will use KVC to change whatever value it needs to. You can also use NSObject's implementation of the NSKeyValueBindingCreation informal protocol which has bind:toObject:withKeyPath:opti­ons: to programmatically bind objects.

  • @AppleProgramming Thanks Lucas. I wasn't asking you to do one. I wanted to know if it was possible. And if it is then I would try to do it myself. I had already set up outlets and such but I couldn't see how slider could observe checkbox. My idea was [checkBox addObserver: slider....] but I was stumped as to which implementation file it would go it. Obviously, I need to do some thinking as how to use the controller class or the informal protocol you mentioned. Thanks again.

  • @1937GRUMPY It really is more complicated then doing it in Interface builder, if you want some tips though, Apple has great documentation on Cocoa Bindings, if you google that it will be the first option.

  • Comment removed

  • Comment removed

  • First! yes nailed it!

  • @anthropamorphic Haha, hope the video quality improves, I lost my export settings from SL and I can't seem to get good settings with small file size.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more