• 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
Declared or not?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Declared or not?


  • Subject: Declared or not?
  • From: "Peter Karlsson" <email@hidden>
  • Date: Wed, 26 Mar 2003 15:06:23 +0000

Dear list!

My interface file looks like this:

----------

@interface DataManager : NSObject
{
@private
Byte **partmidi_ptr;
}

+ (id) singletonInstance;

- (int) getPartmidi_ptr;
- (void) setPartmidi_ptr:(int) value;

@end

----------

And my implementation file looks like this:

----------

#import "DataManager.h"

@implementation DataManager

+ (id) singletonInstance
{
static id sharedDataManager = nil;
if (sharedDataManager == nil)
{
sharedDataManager = [[self alloc] init];
}
return sharedDataManager;
}

- (int) getPartmidi_ptr
{
return **partmidi_ptr;
}

- (void) setPartmidi_ptr:(int) value
{
**partmidi_ptr = value;
}

@end

----------

But this line (located in another file) generates an error, `partmidi_ptr' undeclared, why? I declared it in my interface file...

if((partmidi_ptr = malloc(sizeof(*partmidi_ptr) * 1024)) == NULL)

Peter

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail
_______________________________________________
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: Declared or not?
      • From: "David W. Halliday" <email@hidden>
  • Prev by Date: Leaks in CFPropertyListCreateFromXMLData and CFFileURLCreateDataAndPropertiesFromResource?
  • Next by Date: NSTableView/NSPopUpButtonCell
  • Previous by thread: NSTableView/NSPopUpButtonCell
  • Next by thread: Re: Declared or not?
  • Index(es):
    • Date
    • Thread