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 11:41:58 -0800
Hey Jerry -
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. IB is
complaining because it has a connection which references the old
action name. 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.
That said, Xcode's refactoring feature would have done all of this
automatically.
Good Luck -
Jon Hess
On Jan 4, 2008, at 8:24 AM, Jerry Krinock wrote:
I have a project that was created in Xcode 2, now using Xcode 3 and
IB 3 (Interface Builder 3).
A nib contains a typical Cocoa NSWindow with a typical custom
NSWindowController. A button is targetted to an action in the
window controller. I renamed the action in Xcode. IB still shows
the old action name, however, and when the window loads, I get a
warning that the old-named action cannot be connected to the class.
Duh.
The nib file is the Xcode project's "Groups & Files". I have tried
"Synchronize with Xcode", "Read Class Files", even used the fancy
"Refactor" in Xcode to change the method name. The nib does not
appear in the list of Refactor changes :( Relaunched IB several
times.
It seems that, in IB 3, there is no way to manually edit a class
interface, so it has to be done by one of these menu commands I have
tried. How do I get them to work? (I suppose that ripping out, re-
instantiating, and the re-connecting the custom window controller
would fix it, but there are many connections and that's not going to
be any fun.)
Thanks,
Jerry Krinock
_______________________________________________
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
_______________________________________________
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