Forum Navigation
You need to log in to create posts and topics.

Re Compile Errors

Posted by: fbcocoa.bw <fbcocoa.bw@...>

Deep wrote:

>
> In some of the Cocoa examples recently posted by Steve, for reasons unclear
> to me, I get compile errors to do with variable declarations:
>
> 'fileID' undeclared (first use in this function) in fn 'main' [line 70 of
> _2_CameraView2.m]
>
> I tend to get them main for the global variables.
>
> Any hints available on which Prefs setting is not correct?
>

Haven't a clue why the undeclared error but the global could be eliminated with something like:

BeginCDeclaration
@interface VideoRecorder : NSObject {
id fileID;
}
@property (retain) id fileID;

…..

BeginCFunction
@implementation VideoRecorder

@synthesize fileID;

…..

id file = [QTCaptureMovieFileOutput new];
[recorder setFileID:file];

…..

Bernie