• 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: Cocoa n00b frustrations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa n00b frustrations


  • Subject: Re: Cocoa n00b frustrations
  • From: Andreas Mayer <email@hidden>
  • Date: Thu, 5 Jun 2008 17:23:56 +0200


Am 05.06.2008 um 15:32 Uhr schrieb Charles Jenkins:

I had a Nib file that went bad.

Never had that problem, so I can't help much. But, as you found out, the best way to fix it is probably to create a completely new nib.


You create an object (.h, .m, and object instance in IB) that a control (like a table view) will use as a delegate.

You typically do not instantiate delegate objects in IB.
Usually you will create your delegates in code and connect them to your view objects through outlets.


If checking and rechecking the connection and the method's declaration and implementation doesn't help, how do you solve the problem?

You need to make sure that you are *really* working/testing with the object instance that you did connect to in IB.


Objective-C's delegation paradigm is like magic when it works, but mysterious and frustrating when there is a problem.

There's nothing magic or mysterious in regard to delegates. A delegate is just an object that another object will send messages to.


Besides a malformed method signature and a missing IB connection, what else could be wrong?

You got the wrong object instance? It is a rather common mistake by new developers to instantiate an object in IB *and* create an instance in code. You end up with two distinct objects and are likely to confuse the two - or rather you might not even realise that there is more than one object.



Andreas _______________________________________________

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: 
 >Cocoa n00b frustrations (From: Charles Jenkins <email@hidden>)

  • Prev by Date: Subject: Re: Keyboard Layout Services
  • Next by Date: Re: App hangs when displaying any sheet in 10.5 [SOLVED]
  • Previous by thread: IB label (textfield) as URL / mail-address how?
  • Next by thread: Re: Cocoa n00b frustrations
  • Index(es):
    • Date
    • Thread