Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / August 2005



Tip: Looking for answers? Try searching our database.

How to properly merge files

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Keith Wiley - 18 Aug 2005 19:38 GMT
I am finding it difficult to design-as-I-go, by which I mean, make up the
design as I go along instead of laying everything out in crystaline
perfection before I get started.  For example, in IB, I create a class and
its various outlets and actions.  I save the files.  I go to Xcode and
implement some of the class, adding member variables and function bodies.
Then I decide I need a new outlet, say a new textfield.  I got back to IB
and add the textfield to the class.  I save the files again.  This time it
asks if I want to merge them.  I say yes.

At this point, everything goes screwy.  No matter what merge options I
choose (left, right, both, etc.), the merged file is always an overwrite
of the IB class, wiping out any code I wrote in Xcode?

It is fairly unacceptable to believe that I have to have my interface
perfectly designed from step one and that I cannot modify it during the
development of a project because that will wipe out the existing code.
This can't be how Apple expects people to write large programs?

Besides, merge is there, waiting to be used, it just doesn't seem to merge
anything.

Am I missing something obvious?  This is frustrating, but I'm sure I'm
just doing it wrong.

Thanks.

________________________________________________________________________
Keith Wiley         kwiley@cs.unm.edu         http://www.unm.edu/~keithw

"Yet mark his perfect self-contentment, and hence learn his lesson,
that to be self-contented is to be vile and ignorant, and that to
aspire is better than to be blindly and impotently happy."
                                           --  Edwin A. Abbott, Flatland
________________________________________________________________________
Tom Harrington - 18 Aug 2005 20:54 GMT
> I am finding it difficult to design-as-I-go, by which I mean, make up the
> design as I go along instead of laying everything out in crystaline
[quoted text clipped - 19 lines]
> Am I missing something obvious?  This is frustrating, but I'm sure I'm
> just doing it wrong.

I've always done it by adding the outlet in XCode, and then dragging the
header file over into IB.  Never had a problem with it.  I don't know
what's going wrong in your case, but I've never had a reason to try it,
and I don't get my interfaces perfect from day one either.

Signature

Tom "Tom" Harrington
Macaroni, Automated System Maintenance for Mac OS X.
Version 2.0:  Delocalize, Repair Permissions, lots more.
See http://www.atomicbird.com/

Keith Wiley - 18 Aug 2005 22:00 GMT
> I've always done it by adding the outlet in XCode, and then dragging the
> header file over into IB.  Never had a problem with it.  I don't know
> what's going wrong in your case, but I've never had a reason to try it,
> and I don't get my interfaces perfect from day one either.

Oh, I didn't know I could do it that way.  Sounds a lot easier.  I'll try
it.  Thanks.

________________________________________________________________________
Keith Wiley         kwiley@cs.unm.edu         http://www.unm.edu/~keithw

"Yet mark his perfect self-contentment, and hence learn his lesson,
that to be self-contented is to be vile and ignorant, and that to
aspire is better than to be blindly and impotently happy."
                                           --  Edwin A. Abbott, Flatland
________________________________________________________________________
Patrick Machielse - 19 Aug 2005 00:29 GMT
> At this point, everything goes screwy.  No matter what merge options I
> choose (left, right, both, etc.), the merged file is always an overwrite
> of the IB class, wiping out any code I wrote in Xcode?

Never, ever, use FileMerge. Everyone who has tried has been bitten by it
(at least I have...) It is the world's most confusing software.

Apart from dragging, you can also double-click your instance in IB to
switch to the classes pane and then choose 'Read Myheader.h' from the
Classes menu. I don't know why _only that_ menu item has no shortcut
assigned. Worst decission ever!

patrick
Michael Ash - 19 Aug 2005 03:32 GMT
> Apart from dragging, you can also double-click your instance in IB to
> switch to the classes pane and then choose 'Read Myheader.h' from the
> Classes menu. I don't know why _only that_ menu item has no shortcut
> assigned. Worst decission ever!

I personally feel that "drag the file to the nib window" is a pretty good
shortcut for that particular command.
Patrick Machielse - 19 Aug 2005 09:50 GMT
> > Apart from dragging, you can also double-click your instance in IB to
> > switch to the classes pane and then choose 'Read Myheader.h' from the
[quoted text clipped - 3 lines]
> I personally feel that "drag the file to the nib window" is a pretty good
> shortcut for that particular command.

Yes, but somehow I always have my desktop clutterred with Xcode and IB
windows, so I have to 'dig' through the rubble to locate my header (or
implementation) file. A shortcut to re-import a class interface (or
possibly _all_) would be welcome. I also would like the proper selection
meta-keys in the instances pane, but that didn't make it into 10.4
either.

patrick
Michael Ash - 19 Aug 2005 11:08 GMT
>> > Apart from dragging, you can also double-click your instance in IB to
>> > switch to the classes pane and then choose 'Read Myheader.h' from the
[quoted text clipped - 10 lines]
> meta-keys in the instances pane, but that didn't make it into 10.4
> either.

You can also just drag the file directly from the Xcode project window, or
by using the proxy icon in the title bar of the file's window, which is
what I always do. No need to go hunting for it in the Finder. Presumably
if you've just made a change, you have the header open in an editor, so
you can easily get to its proxy icon.
Keith Wiley - 19 Aug 2005 17:47 GMT
Thanks again for all the good ideas on this topic...and others I have
inquired about.

________________________________________________________________________
Keith Wiley         kwiley@cs.unm.edu         http://www.unm.edu/~keithw

"Yet mark his perfect self-contentment, and hence learn his lesson,
that to be self-contented is to be vile and ignorant, and that to
aspire is better than to be blindly and impotently happy."
                                           --  Edwin A. Abbott, Flatland
________________________________________________________________________
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.