• 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: IB action connections and classes implemented across several files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IB action connections and classes implemented across several files


  • Subject: Re: IB action connections and classes implemented across several files
  • From: Antonio Nunes <email@hidden>
  • Date: Sat, 11 Apr 2009 19:08:03 +0200

On 11 Apr 2009, at 18:29, Antonio Nunes wrote:

On 11 Apr 2009, at 17:50, Kevin Cathey wrote:
You can still have a single header file. For each category of methods, you would create another @interface block. [...]
Then, you would have the implementation files, one for each of your @interface blocks

Interface Builder will then read your MyClass.h and you will have all of your instance variables and actions for the entire class.

That's what I did, but I still got the warnings. It would seem the system doesn't look at categories on a class when looking for declarations of the connected selectors, even if they are in the same header file as the class itself.

Hmmm, since I figured kevin is probably telling the truth regardless of my findings, I created a little test file where I implemented exactly what he suggested (and thus what I had done in my existing project), and the result was fine. I then went back to my existing project, disconnected the action selectors on the UI items in question, and reconnected them to the action methods in the File's Owner. That worked just fine. So how about that!?


I then thought that maybe, because the action selectors had been connected before moving the declarations to a separate category, the warning would be triggered. So I tried that. But no warning in sight. I then tried several other alternatives, and found that the category declarations do not even need to be in the same file (this is how I had originally moved the transplanted code: a separate header file to go with the new implementation file on the category). So, in short, I am stumped as to why I got the warning in the first place. The project is big and long lived, so I suppose something got messed up somewhere, and for whatever reason 'unmessed' itself, after which the symptom can no longer be triggered.

António

----------------------------------------------------
It is better to light a candle than to curse the darkness
----------------------------------------------------



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >IB action connections and classes implemented across several files (From: Antonio Nunes <email@hidden>)
 >Re: IB action connections and classes implemented across several files (From: Antonio Nunes <email@hidden>)
 >Re: IB action connections and classes implemented across several files (From: Kevin Cathey <email@hidden>)
 >Re: IB action connections and classes implemented across several files (From: Antonio Nunes <email@hidden>)

  • Prev by Date: Re: IB action connections and classes implemented across several files
  • Next by Date: New Cocoa programmers & Ruby/Python Bridges (Was Re: how to debug ruby cocoa with Xcode?)
  • Previous by thread: Re: IB action connections and classes implemented across several files
  • Next by thread: CVS on Leopard
  • Index(es):
    • Date
    • Thread