• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
class changes and serialized objects in a nib file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

class changes and serialized objects in a nib file


  • Subject: class changes and serialized objects in a nib file
  • From: "A. Blue" <email@hidden>
  • Date: Wed, 30 Nov 2005 08:45:28 -0800

Lets say I define a class like so:

@interface classA : NSWindow
{
	IBOutlet NSWindow *window;
	IBOutlet SlideView *aView;
}

In Interface builder I instantiate classA and wire up the outlets.

Later on in development the class interface is changed to look like this:

@interface classA : NSWindow
{
	IBOutlet SlideView *aView;
	IBOutlet NSWindow *window;
}

Note that the class name has remained the same, the order of the ivars
has been swapped, and the nib file remains unedited.  What happens
when I run my application?  I finding some difficult bugs in my
application the seem related to this type of problem.  Window
positions are incorrect in release builds, but work fine when running
a debug build in the debugger.

How do I update an object in a nib file when its corresponding class
has changed out from under it?  Is there no other way to do this than
to delete the object from the nib file, instantiate a new object, and
wire up the connections all over again?

Wouldn't it be nice if XCode/Interface Builder notified developers
when a class is changed in a way that obviously invalidates nib file
objects?
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: class changes and serialized objects in a nib file
      • From: Chris Hanson <email@hidden>
    • Re: class changes and serialized objects in a nib file
      • From: Chris Hanson <email@hidden>
    • Re: class changes and serialized objects in a nib file
      • From: j o a r <email@hidden>
  • Prev by Date: Re: Finding the error...
  • Next by Date: Re: Finding the error...
  • Previous by thread: Using Bindings for Tool tips of Table cells?
  • Next by thread: Re: class changes and serialized objects in a nib file
  • Index(es):
    • Date
    • Thread