• 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
Detecting unarchiving from IB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Detecting unarchiving from IB


  • Subject: Detecting unarchiving from IB
  • From: Gerard Iglesias <email@hidden>
  • Date: Thu, 9 Aug 2001 20:37:21 +0200

For a long time I use this trick to detect that an object is unarchived
from a NIB file as a Custom class setting of paletised object :

//
**************************************************************************
***

- (id)initWithCoder:(NSCoder*)aCoder
{
self = [super initWithCoder:aCoder];

// if the class doesn't exist in the archive then we need to
completely initialize the instance, it means that we are unarchiving
from a Nib for example
if ([aCoder versionForClassName:@"GI3DKitView"] == NSNotFound){
// specific initialization

NSLog(@"GI3DKitView unarchiving specific initializing");

camera = [[G3DCamera alloc] initWithSize:[self frame].size];

}

return self;
}

And I am wondering if there is something less tricking?

Gerard


  • Prev by Date: Re: Windows without traffic lights
  • Next by Date: Re: Windows without traffic lights
  • Previous by thread: Re: Windows without traffic lights
  • Next by thread: socklen_t
  • Index(es):
    • Date
    • Thread