ページ 11

Objective-C(Xcode)での開発時に出る警告に関して

Posted: 2011年2月22日(火) 02:51
by haga
Objective-C(Xcode)での開発時に出る警告に関して

Xcodeでビルドすると

drawClass = [[DrawClass alloc] initWithParam:self.currentObj];

上記文に、警告マークが付き、「Incompatible Objective-C types 'struct Command*',expected'struct NSMutableArray*' when passing argument 1

of'initWithParam:' from distinct Objective-C type 」
と出ます。動作自体は問題ないようなのですが、この警告はどういった意味なのでしょうか?。

「self.currentObj」は「Obj」クラスのオブジェクトです。

Re: Objective-C(Xcode)での開発時に出る警告に関して

Posted: 2011年2月23日(水) 08:17
by naohiro19
「'struct Command'はObjective-Cの型と互換性がありません。'struct NSMutableArray*'は、第1引数を予測できません。」という意味の英語です。