Note that there are some explanatory texts on larger screens.

plurals
  1. PO"No visible @interface for 'BlahDataController' declares the selector 'aMethod:'"
    primarykey
    data
    text
    <p>A simple example of my problem:</p> <p>"Within the BlahDataController.h"</p> <pre><code>@interface BlahDataController : NSObject -(NSString *)aMethod:(NSString *)theString; @end </code></pre> <p>"Within the BlahDataController.m"</p> <pre><code>#import "BlahDataController.h" @implementation BlahDataController -(NSString *)aMethod:(NSString *)theString { return @"Something"; } @end </code></pre> <p>"Within BobViewController.h"</p> <pre><code>@interface BobViewController : NSObject -(void)aMethodOfSomeSort; @end </code></pre> <p>"Within BobViewController.m"</p> <pre><code>#import "BobViewController.h" #import "BlahDataController.h" @implementation BobViewController -(void)aMethodOfSomeSort { BlahDataController *blahDataController = [[BlahDataController alloc] init]; NSLog(@"%@",[blahDataController aMethod:@"Variable"]); } @end </code></pre> <p>On the line "NSLog(@"%@",[blahDataController aMethod:@"Variable"]);" I'm receiving the error: "No visible @interface for 'BlahDataController' declares the selector 'aMethod:'"</p> <p>Anyone know why this error is occurring?</p> <p>-=-=-=-=-=-=-=-=-=-=-</p> <p>The thing is, in my actual program, I have this same implementation and it works fine for hundreds of methods created this way. However, every so often, I'll receive this error on a newly created method. I didn't make it any differently. It just won't recognize it's newly created existence.</p> <p>-=-=-=-=-=-=-=-=-=-=-</p> <p>This is how I'm currently going around it, although I have no idea why the compiler accepts this way, but not the other:</p> <p>Modify BobViewController.m:</p> <pre><code>#import "BobViewController.h" #import "BlahDataController.h" #import "AnotherDataController.h" @implementation BobViewController -(void)aMethodOfSomeSort { BlahDataController *blahDataController = [[BlahDataController alloc] init]; AnotherDataController *anotherDataController = [[AnotherDataController alloc] init]; [anotherDataController fixedMethod:blahDataController theString:@"Variable"]; } @end </code></pre> <p>"Within the AnotherDataController.h"</p> <pre><code>@interface AnotherDataController : NSObject -(void)fixedMethod:(BlahDataController *)blahDataController theString:(NSString *)theString; @end </code></pre> <p>"Within the AnotherDataController.m"</p> <pre><code>#import "AnotherDataController.h" #import "BlahDataController.h" @implementation AnotherDataController -(void)fixedMethod:(BlahDataController *)blahDataController theString:(NSString *)theString { NSLog(@"%@",[blahDataController aMethod:theString]); } @end </code></pre> <p>And....it works just fine...So I imagine xcode is just failing to recognize the method in one class, and working as it should in another...Man, I have no idea why this error is occurring...</p> <p>-=-=-</p> <p>Minor Update:<br> Doing the entire "xcode dance" didn't solve the issue<br> 1) Clean Build<br> 2) Delete Derived Data<br> 3) Completely Close XCode and reopen </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload