RE: Accessing instance method in nib
RE: Accessing instance method in nib
- Subject: RE: Accessing instance method in nib
- From: "Chen Wang" <email@hidden>
- Date: Wed, 27 Jul 2005 17:48:20 -0400
- Thread-topic: Accessing instance method in nib
_____
From: Charilaos Skiadas [mailto:email@hidden]
Sent: Wednesday, July 27, 2005 3:46 PM
To: Chen Wang
Cc: email@hidden
Subject: Re: Accessing instance method in nib
On Jul 27, 2005, at 2:11 PM, Chen Wang wrote:
Thanks for the reply.
>> - (NSString*) Foo (NSString*)theString;
>
> You probably meant to write:
>
>- (NSString*) Foo: (NSString*)theString;
> Notice the colon.
Oops, it was my typo in the e-mail, the colon is not missing in the real
source code. I will do copy/paste but not re-type the code next time.
>In that case, how are you calling Foo? Supposing outletB is the name of
the outlet that A has connecting it to B, and the > > following code >is
within some method of objA, the following should work:
>
> result = [outletB Foo:someString];
I'm doing exactly the same thing.
>If not, then you better tell us what the exact compiler warning/error
you are getting is.
It was a warning (not error) message. If you put two methods M1 and M2
in @implementation without declaring them in @interface, M1 is before
M2, and M1 calls M2, then the compiler will report exactly the same
warning. In my case, sometimes the app works, but sometimes not.
> Oh, of course you should also include in class A , at the top, a line
like:
>
>#include "classB.h"
>
>or at the very least
>
>@class classB;
>
>So that the compiler knows about it.
You are absolutely right, I need to do so to inform classA about classB,
and get ride of the warning. But this will bring me back to the source
of the problem -- the issue mixing objC and objC++.
>Not knowing anything about mixing Obj-C with Obj-C++, I'll stay clear
of the second part of your email. But if all these are Obj-C classes,
>then it should have nothing to do with it.
Thanks a lot. I'm working on re-building a Windows application on Mac.
Under a cross-platform policy, I have to use the existing C++ code as
much as possible, and that brings the challenge.
Thank you again Haris for you suggestion.
Chen
Confidentiality Notice: This e-mail, including any attachments, is for the sole use of the intended recipient(s) and may contain private, confidential, and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient or this information has been inappropriately forwarded to you, please contact the sender by reply e-mail and destroy all copies of the original.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden