• 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
Re: returning NO from readFromFile:ofType: causes exception
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: returning NO from readFromFile:ofType: causes exception


  • Subject: Re: returning NO from readFromFile:ofType: causes exception
  • From: Robert Clair <email@hidden>
  • Date: Fri, 18 Feb 2005 20:39:52 -0500

I'm not sure if it's the root cause here but you always need to do self = [super init...].

I don't think this is the problem -

    [super initWithContentsOfFile: fileName ofType: docType];

calls  - init.

I've also overridden -init and my subclass version of -init does self = [super init...].

Anyway, this happens before the call to readFromFile:ofType:

what appears to be missing is something along the lines of

  if ( ! [self  readFromFile:  myFileName ofType: myFileType )
      {
           self = nil
           return self;
     }



.....Bob

_______________________________________________
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


References: 
 >returning NO from readFromFile:ofType: causes exception (From: Robert Clair <email@hidden>)
 >Re: returning NO from readFromFile:ofType: causes exception (From: Robert Clair <email@hidden>)
 >Re: returning NO from readFromFile:ofType: causes exception (From: Frank Midgley <email@hidden>)

  • Prev by Date: Re: returning NO from readFromFile:ofType: causes exception
  • Next by Date: Re: returning NO from readFromFile:ofType: causes exception
  • Previous by thread: Re: returning NO from readFromFile:ofType: causes exception
  • Next by thread: Re: returning NO from readFromFile:ofType: causes exception
  • Index(es):
    • Date
    • Thread