• 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
inheriting from NSMutableData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

inheriting from NSMutableData


  • Subject: inheriting from NSMutableData
  • From: daniel oberhoff <email@hidden>
  • Date: Sun, 14 Sep 2003 00:33:57 +0200

i am having a problem in my subclass of NSMutableData:

i want it to handle audioformats. that is there is an additional field for an audioformat and some conversion routines as well as audiofile loading and writing (using the AudioToolbox).

now i have my own designated initializer which includes specification of the format:

-(id)initWithLength:(unsigned)length format:(AudioStreamBasicDescription*)format {
if (self = [super initWithLength]) {
[self setFormat:format];
}
return self;
}

i get an exception telling me that initWithCapacity is only defined for abstract class and that i should define it in my class. shure i could, just calling super within (sorry, i forgot to try and now its no the other system...) but it shows me that i have not understood the inheritance.

i mean, NSMutableData should have a concrete implementation of initWithCapacity, why isnt it just called? is there any more stones in the way? it suggests so. coz i was assuming i could also still use all the other init methods (which is why i access the format with selector methods so if it isnt defined it will say so...and define it to canocal 44.l float lpcm or such).

greatly appreciate any comments (and if u could CC them to me? this list gets crowded...).

daniel
_______________________________________________
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.

  • Prev by Date: [ANN] AGProcess 0.2
  • Next by Date: Re: [ANN] AGRegex 0.4
  • Previous by thread: [ANN] AGProcess 0.2
  • Next by thread: Re: inheriting from NSMutableData
  • Index(es):
    • Date
    • Thread