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
- You do not need to declare an example variable in the method.
- You should then maintain the instance variable object:
[_Ruta_APP autorelease];
_ Ruta_APP = [[Copy the NSBundle main bundle] bundle]];
Comments
Post a Comment