cocoa - warning on nsbundle bundlepath -


I have to get the executable path of my bundle. (I want to get the path, so I can load images in NSImageView)

I have found this.

  NSString * _Ruta_APP = [[NSString alloc] init]; _ Ruta_APP = [[NSBundle main bundle] bundle];  

But the compiler says / ControlPP M: 33xx / ControlApp. M: 33: Warning: The local declaration of '_ Ruta_APP' hides the frequency variable

but can not I use the value of _Ruta_APP

?

If you really want to put the path in an example variable, just kill the first line

  1. You do not need to declare an example variable in the method.
  2. You should then maintain the instance variable object:

[_Ruta_APP autorelease];
_ Ruta_APP = [[Copy the NSBundle main bundle] bundle]];


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -