Simple Fullscreen QC App erro compiling on xcode 5

balam's picture

Hi, I am a newby regarding xcode programming. I get a compile error on xcode 5 on Maverick os

any advice or file fix will be really apreciated

attach zip file download from the download section of kineme

error

CompileXIB English.lproj/MainMenu.xib cd /Users/Downloads/QCFullscreen setenv XCODE_DEVELOPER_USR_PATH /Applications/Xcode.app/Contents/Developer/usr/bin/.. /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --minimum-deployment-target 10.9 --output-format human-readable-text --compile /Users/balam/Library/Developer/Xcode/DerivedData/QCFullscreen-frhcpxoepwjwzvgtrsnnjwkngnqb/Build/Products/Debug/QCFullscreen.app/Contents/Resources/English.lproj/MainMenu.nib /Users/Downloads/QCFullscreen/English.lproj/MainMenu.xib

2013-12-09 21:24:51.342 ibtoold[3039:507] *** CGLCreateContext() called from "-[QCCGLContext initWithPixelFormatAttributes:options:]" returned error 10002 ("invalid pixel format") 2013-12-09 21:24:51.342 ibtoold[3039:507] Exception raised while unarchiving document objects - -[QCView _initializeRenderView]: Object creation failed /* com.apple.ibtool.errors */ /Users/balam/Downloads/QCFullscreen/English.lproj/MainMenu.xib: error: The document "MainMenu.xib" could not be opened. The operation couldn’t be completed. (com.apple.InterfaceBuilder error -1.) Recovery Suggestion: Check the console log for additional information.

PreviewAttachmentSize
qcOSC-v0.6.zip108.06 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

balam's picture
Re: Simple Fullscreen QC App erro compiling on xcode 5

sorry wrong file attached

here is the file ( from download area )

PreviewAttachmentSize
QCFullscreen.zip59.01 KB

zanroversi's picture
Re: Simple Fullscreen QC App erro compiling on xcode 5

Hello,

I opened your project in Xcode5 / 10.9 and I see a "missing SDK" error (Apparently it has been written in 10.5 and I do not have the 10.5 SDK anymore and I'm not even sure it's possible to install it into such recent release of xcode).

Maybe you should re-write it with 10.9 SDK and have a look on this topic, because creating QCView via Interface Builder is not working anymore :

http://kineme.net/forum/DevelopingCompositions/MavericksDeprecation#comm...

For full-screen capabilities, I suggest this (working nice for me), assuming you have a "controlWindow" for controllers and a "viewerWindow" which contains your QCView. This will send your viewer in full screen in the screen where your controlWindow is not :

-(IBAction)toggleFullScreen:(id)sender
{
    NSDictionary *opts = [NSDictionary dictionaryWithObjectsAndKeys:
                    [NSNumber numberWithBool:NO], NSFullScreenModeAllScreens,
                    [NSNumber numberWithInt:0], NSFullScreenModeWindowLevel,
                    [NSNumber numberWithInt:5], NSFullScreenModeApplicationPresentationOptions,nil];
 
    if([[viewerWindow contentView] isInFullScreenMode])
    {
        [[viewerWindow contentView] exitFullScreenModeWithOptions:nil];
        if (![qcView isRendering])
        {
            [qcView startRendering];
        }
    }
    else
    {
        if ([[NSScreen screens] count]>1)
        {
            //envoyer sur l'écran où n'est pas controlWindow
            NSMutableArray*myScreens = [[NSScreen screens] mutableCopy];
            [myScreens removeObject:[controlWindow screen]];
            [[viewerWindow contentView] enterFullScreenMode:[myScreens objectAtIndex:0] withOptions:opts];
        }
        else
        {
            [[viewerWindow contentView] enterFullScreenMode:[NSScreen mainScreen] withOptions:opts];
        }
        if (![qcView isRendering])
        {
            [qcView startRendering];
        }
    }
}

balam's picture
Re: Simple Fullscreen QC App erro compiling on xcode 5

Thank ! I am a newbie with xcode
saw you link to the forum download the template and works really good wondering if you have some hints how to work with this new template and add full screen.

attach file from

http://kineme.net/forum/DevelopingCompositions/MavericksDeprecation#comm...

thanks in advance

PreviewAttachmentSize
qcViewSample.zip29.15 KB

zanroversi's picture
Re: Simple Fullscreen QC App erro compiling on xcode 5

There is the updated project with fullscreen (for one window only). Hope it will inspire you. bye.

PreviewAttachmentSize
qcViewSample-fullscreen.zip29.37 KB

balam's picture
Re: Simple Fullscreen QC App erro compiling on xcode 5

Thank YOU!! time to study the project this file should be in the download version. its a great help for new programmers like me.

balam's picture
Re: Simple Fullscreen QC App erro compiling on xcode 5

thanks been playing with your project ( awesome by the way ) there are few lines that I can not guess what they do.

from file Bunappdelate.m what do they do? what do they count?


  • (void) observeValueForKeyPath:(NSString)keyPath ofObject:(id)object change:(NSDictionary)change context:(void*)context { if ([keyPath isEqualToString:@"patch.Count.value"]) { int val = [[qcView valueForOutputKey:@"Count"] intValue]; NSLog(@"%@ = %d", keyPath, val); } }

balam's picture
Re: Simple Fullscreen QC App erro compiling on xcode 5

- (void) observeValueForKeyPath:(NSString*)keyPath
                  ofObject:(id)object
                   change:(NSDictionary*)change
                  context:(void*)context
{
    if ([keyPath isEqualToString:@"patch.Count.value"])
    {
        int val = [[qcView valueForOutputKey:@"Count"] intValue];
        NSLog(@"%@ = %d", keyPath, val);
    }
}

zanroversi's picture
Re: Simple Fullscreen QC App erro compiling on xcode 5

Hello,

In your cocoa app, you can get value of a published output on demand with :

[qcView valueForOutputKey:@"nameOfYourPublishedOutput"] // You'll get the last value at this moment.

Or you can "Observe" this published output in order to execute automatically a function when the value change, thats what I've made here.

The function you quoted is automatically called when the "Count" output value changes, because I asked at app launch with this line :

[qcView addObserver:self forKeyPath:@"patch.Count.value" options:NSKeyValueObservingOptionNew context:NULL];

It's sometimes useful to be warned automatically when something happens in your QC Composition (something that you can't predict, by example) (sorry if it's a bit off topic :-) bye