One Quartz Composer composition, multiple views

Discussion in 'Mac Programming' started by Sijmen, Nov 8, 2007.

  1. Sijmen macrumors 6502a

    Sep 7, 2005
    Short version:

    How to have 1 quartz composition output to multiple views?

    Long version:

    Has to be compatible with Tiger. I've tried several methods.
    1. Simply multiple QCViews. I'm not sure how these would be kept in sync, as they really would be indipendent renderers.
    2. One QCPatchController, multiple QCViews. Seems to be impossible as I can only create a 1-1 binding for 'patch'.
    3. Multiple QCPatchControllers, multiple QCViews. Problem here is again keeping them in sync, and it seems QCPatchController isn't available programatically. (No public API, no header files.)
    4. Multiple QCRenderers. Here I can have control over the sync, but I don't really know how to set inputs and read ouputs. Is that even possible at all?
    It appears the last option is the best, only if I knew how to set inputs..

    Any ideas?
    Thanks :)
  2. samsoffes macrumors newbie

    May 26, 2009
    From what I have found, it is not possible to bind multiple QCViews to the same QCPatchController.

    You can access the patch controller programatically though. I just create an outlet for it and then do something like

    [self setValue:someObject forKeyPath:@"patchController.patch.myOutletName.value"];
    patchController being what I named the property that has the IBOutlet to my QCPathController and myOutletName being the name of the outlet (the trailing .value is required).

    Hope that helps.

    Oh, by the way, you can output the same composition in multiple views using QCRenderers. There is no way to sync them or share data between them built in. You have to create all of that functionality. Not a good solution, but it does work. One of my older apps that does this.

    I would recommend pursuing bindings and and object that manages a patch controller for each QCView you want to use or something like that.

Share This Page