Re: IB Doesn't Get Renamed Action in Custom Class
Re: IB Doesn't Get Renamed Action in Custom Class
- Subject: Re: IB Doesn't Get Renamed Action in Custom Class
- From: Jonathan Hess <email@hidden>
- Date: Fri, 4 Jan 2008 17:46:01 -0800
On Jan 4, 2008, at 2:53 PM, Jerry Krinock wrote:
On 2008 Jan, 04, at 11:41, Jonathan Hess wrote:
Interface Builder can't tell the difference between add and a
delete of an action and a rename if you just edit the source code.
I know. That's why I saved the header file in Xcode, then returned
to IB and did "Synchronize with Xcode" and "Read Class Files". But
still, IB does not "get" the new name.
I see. Under normal circumstances, if you're using IB with files from
an Xcode Project, you shouldn't ever have to invoke "Synchronize with
Xcode" or "Read Class Files". It's automatic. If you aren't seeing the
action name show up in IB, then there's either a bug in IB, or a parse
error in the source file.
Is the little green light indicator in the bottom of the document
window green? Or is it yellow? If it's yellow it indicates a parse
error. Are there categories definitions for this class in this header,
or other headers? IB 3.0 had a couple of subtle bugs with categories.
If not, could you file a radar and include your header file?
IB is complaining because it has a connection which references the
old action name.
No, I have not seen any complaints from IB. When I run the project,
the Cocoa run-time complains because the old action is not
available. That is understandable.
If you bring up the connections HUD, you don't see something like this?
There should also be a warning indicator in the bottom of the document
window like this:
If neither of those errors are present, it seems that IB isn't parsing
your header at all as opposed to parsing it and just missing the new
action.
IB knows about the new name, it just doesn't know that the new name
is a replacement for the old name. You'll have to disconnect the
old action in IB, and reconnect it to the new selector. As soon as
you disconnect the action, and IB re-syncs, the old definition will
go away.
I wish it were so. The new name does not show up in the Inspector
or the HUD so I cannot connect to it. I just disconnected the old
connection as you suggested, again "Synchronize with Xcode" and
again "Read Class Files", but still no good. New action name does
not appear in Inspector and does not appear in the HUD. Old action
name remains in both places. IB seems very happy with it.
Are you sure you're using the right class. Maybe you could a new
document, that isn't a part of any project. Then "read class files…",
then change the class of the file's owner to be the class from the
header. If you still don't see the outlets, then you should file a bug
on IB.
That said, Xcode's refactoring feature would have done all of this
automatically.
Which is why I tried that before sending my original post, but
Refactor didn't work either. As I said, the nib did not appear in
the list of files to be modified in the Refactor window. Is that a
clue? In the filesystem, this nib, and the associated window
controller .h and .m files, are outside this project's folder,
because they are one of my multi-project "commonly-used kits". But
the nib is included in Groups & Files. Why didn't Refactor parse it
and find the old name?
It sounds like maybe you're not using the class you think you're
using? Remember that the class names are case sensitive.
Good Luck -
I've not been having any of that either. DSL line has been down for
3 hours due to wind blowing phone lines, causing impulse noise that
rarely allows modem to sync and connect. If the wind dies down,
I'll be able to get the next reply sooner!
Thanks,
Jerry
Jon Hess
_______________________________________________
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