• 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: obj-c newb question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: obj-c newb question


  • Subject: Re: obj-c newb question
  • From: Michael Stevenson <email@hidden>
  • Date: Tue, 4 Nov 2003 21:43:28 -0600

So, can you explain to me the diff. between a class method and an instance method? I declared the GetDefaultDevice method with the -,
but I admittedly dont quite understand the difference between a class method and instance as my background is in C++ and I havent been
able to map this idea to anything that I'm currently familiar with ...

Thanks.


On Nov 4, 2003, at 7:44 PM, Mike R. Manzano wrote:

device = [doop GetDefaultDevice];

Looks like you're trying to access a class method. Class methods are designated with a "+" instead of a "-". So,

+(AudioDeviceID)GetDefaultDevice;

in your declaration, and

+(AudioDeviceID)GetDefaultDevice {

in your implementation.


On Nov 4, 2003, at 4:40 PM, Michael Stevenson wrote:


main:
int main() {
id DefaultDevice;
AudioDeviceID device;
DefaultDevice = [[doop alloc] init];
printf("defaultdevice: 0x%x\n", (int)DefaultDevice);
device = [doop GetDefaultDevice];
printf("device id: 0x%x\n", (int)device);
return 0;
}//main
_______________________________________________
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.
_______________________________________________
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.
_______________________________________________
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: obj-c newb question
      • From: David Remahl <email@hidden>
References: 
 >obj-c newb question (From: Michael Stevenson <email@hidden>)
 >Re: obj-c newb question (From: "Mike R. Manzano" <email@hidden>)

  • Prev by Date: Re: obj-c newb question
  • Next by Date: Re: unsigned 16 digit integer data type?
  • Previous by thread: Re: obj-c newb question
  • Next by thread: Re: obj-c newb question
  • Index(es):
    • Date
    • Thread