Thursday 15 August 2013

cocoa - Problems with Variables in Objective-C -


My app is trying to run from the menu bar and I added the following to AppDelegate.h and I get the error I can not declare variable within @protocol or @interface. "

  @interface AppDelegate: NSObject & lt; NSApplicationDelegate & gt; {IBOTATELE NsMNU * Status menu; NSSTITIM * Status item; }   

Can anyone help please? Thank you very much Andrew

I'm betting that your real code is not that the error you got indicates that You have forgotten the braces around your frequency variable.

Incidentally, these days, it is more common to declare qualities in the header only, and if you need to declare the real example variable, then you do this @implementation blocks, in the braces, the properties are part of your public interface and example variables (a private part of the implementation).

No comments:

Post a Comment