On Jul 1, 2012, at 4:54 PM, Richard Altenburg (Brainchild) wrote:
> Thanks for your thoughts, Charles.
> 
> No, I did not copy the .xib to a new project.
> 
> I created a new project for iOS wit one view, and created a new class in it 
> that is to be a subclass of UIView which will contain my drawing code in 
> drawRect. I copied code from the old project over into the new project, into 
> the .h and .m files of the new class. It immediately showed that the outlets 
> and actions were connected, and on inspection they were connected to the .xib 
> in the old project. I connected them to my new .xib in my new project, but 
> how on earth are old ones copied over to a new project is beyond me at this 
> moment.

At least once I've started a new project and within the new window a file was 
open that belonged to a previously opened project. I wonder if this is what 
happened to you, and the xib file you were looking at was not the xib file in 
your new project.

If you Command-click the file icon in the window's title bar, you can see the 
full path of the file you are looking at. If the path goes to the old project, 
close it with File > Close "YourFileName.xib". The keyboard equivalent is 
Control-Command-W. You might even want to close *all* files that are open in 
that window by holding down that key until the window says "No Editor". Closing 
the project window and reopening might help -- I didn't think to try that.

Then click on the xib as listed on the left, in the file navigator pane. *That* 
xib, the correct one, shouldn't have any mysterious connections. The only 
connected outlets should be any that are automatically created when you create 
certain kinds of nib, e.g., from a window controller to a window.

--Andy

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to