• 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
categories question...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

categories question...


  • Subject: categories question...
  • From: Philip George <email@hidden>
  • Date: Sun, 13 Jul 2003 04:43:49 -0500

Can someone who has some categories experience lend a hand here. I have a
category set up that adds to NSLayoutManager. It was working before I tried
over-riding the "init" method. I had another method with a totally
different name (not an over-ride in other words) which worked great, but my
init over-ride is failing at the "return self;" line with EXC_BAD_ACCESS.

What am I doing wrong?
What's the fix?
Class posing won't work because of another issue,
so that's out of the question.
How can I get this category to work?

/// CODE /////////////////////
//////////////////////////////
//////////////////////////////

#import <Cocoa/Cocoa.h>

@interface NSLayoutManager (myLayoutManagerAdditions)
- (id)init;
@end

@implementation NSLayoutManager (myLayoutManagerAdditions)
- (id)init {
if (self = [super init]) {
// do some post-init initting
// for now though, it's literally just this comment
}
return self; // here's where i get the EXC_BAD_ACCESS
}
@end

//////////////////////////////
//////////////////////////////
//////////////////////////////

Thanks.

- Philip
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: categories question...
      • From: Jonathan Jackel <email@hidden>
    • Re: categories question...
      • From: Gerard Iglesias <email@hidden>
  • Prev by Date: Re: getCString a good idea here?
  • Next by Date: Re: How to construct Unicode Safe Strings in the source?
  • Previous by thread: gdl2 (was Re: Linking problems with PostgreSQL)
  • Next by thread: Re: categories question...
  • Index(es):
    • Date
    • Thread