ARC and forward declaration error

Hi All,
Getting back to my ASOC project now and switching over to ARC for OS 10.8

I have a timer class

@class backupCAppDelegate;
@class backup;

@interface SHTimer : NSObject {

	IBOutlet backupCAppDelegate *bDelegate;
	IBOutlet backup *bBackup;

and am seeing this error when trying to access my applescript class. Worked before under GC.

BOOL isVolume =  [[bBackup checkIfDiskExists:destString];

compile error: receiver type 'backup' for instance message is forward declaration

I connected the outlet bBackup between the backup applescript instance (blue cube) and the timer blue cube.It’s been a while and I am a bit befuddled with the old communications between the two classes.

Thanks, Rob

You have unbalanced square brackets there…

Yes I just miscopied the method.In the code it is:

BOOL isVolume =  [bBackup checkIfDiskExists:destString];

I did some more searching though and came across an old post of Shane’s and tried it.

[NSClassFromString(@“backup”) checkIfDiskExists:destString];

It compiles. I will see if it works in the field. So we don’t even need to use the blue cube instance and can access the class directly?


As long as you don’t need the class to have any properties, yes.

Oh right… so to access properties we go with alloc() init() and make an instance? Or the blue cube instance…

Thanks Shane. Starting to make sense again.