• 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
subclassing NSBitmapImageRep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

subclassing NSBitmapImageRep


  • Subject: subclassing NSBitmapImageRep
  • From: Patrick Tepesch <email@hidden>
  • Date: Wed, 20 Feb 2002 00:00:34 -0500

I am trying to create a subclass of NSBitmapImageRep to handle reading 16-bit tiff files. To test this, I have overridden the following methods, and all the methods for creating reps:

+ (NSArray *)imageUnfilteredFileTypes {
static NSArray *types = nil;

printf("MyBitmapImageRep imageUnfilteredFileTypes!!!!\n");
if (!types) types = [[NSArray alloc]
initWithObjects:@"TIF", nil];
return types;
}

+(void)load
{
printf("MyBitmapImageRep load!!!!\n");
[NSImageRep registerImageRepClass:[MyBitmapImageRep class]];
}

Both printf statements execute in my code, and my code is called if I give it a new type rather than a type already handled by NSBitmapImageRep. But when the a .TIF image is loaded from NSImage it still calls NSBitmapImageRep methods, rather than the methods in my subclass, thus the load continues to fail.

Any suggestions on how to get my subclass methods called before the NSBitmapImageRep methods?

Thanks,

Patrick Tepesch
_______________________________________________
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: subclassing NSBitmapImageRep
      • From: Patrick Tepesch <email@hidden>
  • Prev by Date: Re: Reading several UserDefaults
  • Next by Date: Editing defaults of other apps
  • Previous by thread: Re: Cut & past support in NSTableView
  • Next by thread: Re: subclassing NSBitmapImageRep
  • Index(es):
    • Date
    • Thread