I had an
IBOutlet id abc;
in my MYObject class header file.
This outlet "abc" was properly displayed on the Inspector Connection panel
on IB, when I selected the blue cube "MyObject". Well.
Lately I removed the abc outlet from the header, recompiled, run, etc...
But on IB I still see that outlet, disconnected, but still there and "not"
grayed out. It is black and selectable/linkable. The strange thing is that I
can see this outlet listed on the Inspector Connection panel even if I
select "any" other different blue cube, I mean, a different object whose
header does not contain that outlet name.
I quit, relaunched Xcode and IB, reopened the project, verified that there
is no "abc" string on all of my code, many times. Same problem. It looks
lika a case of a "ghost outlet", invading all the nib file...
So, I have looked within the designable.nib file within the MainNib.nib file
and I have found this trace of this ghost
<dictionary class="NSMutableDictionary" key="outlets">
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="abc">
What's that? What should I do? Can I delete these lines?
On 2010 Nov 13, at 09:04, gMail.com wrote:
> I quit, relaunched Xcode and IB, reopened the project, verified that there
> is no "abc" string on all of my code, many times.
You didn't mention the action which *should* remove that outlet, which is to click in the menu File > Read Class Files… or Reload All Class Files…
> So, I have looked within the designable.nib file within the MainNib.nib file
> and I have found this trace of this ghost
> Can I delete these lines?
Well, first of all I wonder if you really mean the "nib" file instead of the more modern "xib".
As to deleting it, the answer is that this is not recommended, and I wouldn't do it without very careful examination of the xml. I would just ignore these ghost outlets and maybe they'll go away by themselves, maybe in your next update of Xcode.
Or, ask on <xcode-users...>, a more appropriate forum for this question.