• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Dynamically loading a part of a Window in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamically loading a part of a Window in Cocoa


  • Subject: Re: Dynamically loading a part of a Window in Cocoa
  • From: "Adam R. Maxwell" <email@hidden>
  • Date: Wed, 01 Jul 2009 20:48:27 -0700


On Jul 1, 2009, at 8:18 PM, Marco S Hyman wrote:

On Jul 1, 2009, at 6:50 PM, Adam R. Maxwell wrote:

Well, I generally avoid bindings, since I can't comment nib/xib files, and it takes too long to reverse engineer my own (or worse, someone else's) bindings when I'm doing maintenance work. With that perspective, the minor glue code to swap views is no big deal :).

Warning: subject creep.

That leads directly to something I've been thinking about as one new to cocoa:
how do you document your bindings? Any preferred formats other than a text
file stuck somewhere in a project?

If you are new to Cocoa, I strongly recommend that you avoid bindings until you're comfortable with datasource/delegate/target-action and outlets. Having said that, a separate file is the only way I know of to document a nib, and in the open-source projects that I've worked on, refactoring and debugging are more painful with bindings.


I think bindings are really helpful in automatic change propagation and validation. However, they are also tricky to debug; if you naively try binding a toolbar button's enabled state to [[NSOperationQueue operations] count], for instance, you'll get random crashes. KVO-compliant code such as indexed accessors can be generated for bindings, but that's as tedious as a tableview datasource, IMO. Likewise, keypaths and array/set operators can be really powerful, but the compiler won't catch mistakes in spelling of - mutableArrayValueForKeyPath:@"someKyePath". If you're not as error- prone as I am, this may not be an issue :).

--
Adam

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Dynamically loading a part of a Window in Cocoa (From: Debajit Adhikary <email@hidden>)
 >Re: Dynamically loading a part of a Window in Cocoa (From: Thomas Davie <email@hidden>)
 >Re: Dynamically loading a part of a Window in Cocoa (From: Quincey Morris <email@hidden>)
 >Re: Dynamically loading a part of a Window in Cocoa (From: "Adam R. Maxwell" <email@hidden>)
 >Re: Dynamically loading a part of a Window in Cocoa (From: Quincey Morris <email@hidden>)
 >Re: Dynamically loading a part of a Window in Cocoa (From: "Adam R. Maxwell" <email@hidden>)
 >Re: Dynamically loading a part of a Window in Cocoa (From: Marco S Hyman <email@hidden>)

  • Prev by Date: is NSTableColumn valueForUndefinedKey:@"value"?
  • Next by Date: Re: User interface validation doesn't work, right?
  • Previous by thread: Re: Dynamically loading a part of a Window in Cocoa
  • Next by thread: Re: Dynamically loading a part of a Window in Cocoa
  • Index(es):
    • Date
    • Thread