Re: 2 classes
Re: 2 classes
- Subject: Re: 2 classes
- From: Bertrand Mansion <email@hidden>
- Date: Thu, 01 Aug 2002 13:08:43 +0200
>
> On Thursday, August 1, 2002, at 11:54 AM, Chong Hiu Pun wrote:
>
> In my cocoa application, I have 2 classes, A & B, where A is the main
>
> class
>
> and B is do the calculation without UI element.
>
> How can I
>
> 1.) instantiate class B ? (do I need to implement a constructor for
>
> class B?)
>
> 2.) Get the calculation result of B ( using getter method? But if I
>
> cannot
>
> instantiate class B, I cannot do it either)
>
1.) myBInstance= [[B alloc] init]; // myBInstance=[B new];
>
>
2.) Not enough information to give a good answer.
I would say :
[myBInstance getCalculationResult];
or something like that.
Bertrand Mansion
Mamasam
_______________________________________________
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.