|
From: | Philip Mötteli |
Subject: | Re: What does "va_start and va_return type disagree" mean? |
Date: | Tue, 6 Apr 2004 21:45:24 +0200 |
Hi Am 06.04.2004 um 19:24 schrieb Richard Frith-Macdonald:
On 6 Apr 2004, at 18:01, Philip Mötteli wrote:I have a annoying Distributed Objects problem: I call a method - (BOOL)saveFileToName:(bycopy NSString *)aName { return YES; }from a proxy. The method is called at the other end, but immediately afterwards, the local end crashes, saying:vacall: va_start type 14 and va_return type 3 disagree. Program received signal SIGABRT, Aorted.
I know it sounds unlikely, but I'd have though that this meant that the method in the remote process has a different return type to the method in the local process.If the method is not declared in the local process, the compiler will have built the software to expect it to have a return type of 'id', so when it tires to return a 'BOOL' it can't. The simple solution is to have a protocol declaring the method which is visible when the local process is compiled, so that the compiler knows to build the code to expect a BOOL return.
Thanks, that was the solution!But what, if I don't always want or can define a protocol for everything, that doesn't return an 'id'?
Thanks Phil
[Prev in Thread] | Current Thread | [Next in Thread] |