Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Manual Bindings



I am trying to tie together a QC composition and a NSArrayController so that whenever the array controller has a selection the corresponding data is sent to the 'String' published port in my composition.

I've got IBOutlets to both the QCView and the NSArrayController. I tried to use the following to set up the binding in awakeFromNib()

[myQCview bind:@"patch.String.value" toObject:postsArrayController withKeyPath:@"selection.body" options:nil];

it doesn't work. i get the following error at runtime:
*** NSRunLoop ignoring exception '[<QCView 0x3c80d0> setValue:forUndefinedKey:]: this class is not key value coding- compliant for the key patch.String.value.' that raised during posting of delayed perform with target 374bfe0 and selector 'invokeWithTarget:'


I tried @"String.value" as the bind: argument as well, but that simply causes the exception to be thrown immediately and the app crashes.

The issue that you're not following the MVC model: the composition is the model, the QCPatchController the controller, and the QCView the view. You cannot bind UI controls to the QCView directly. You need to bind them to the controller, which takes care of updating the model & view accordingly.


See this to learn how to use bindings with Quartz Composer:
http://developer.apple.com/documentation/GraphicsImaging/Conceptual/ QuartzComposer/qc_play_ib_input/chapter_5_section_1.html#//apple_ref/ doc/uid/TP40001357-CH208


________________________________________________________
Pierre-Olivier Latour                            email@hidden
Quartz Composer Architect                Graphics & Imaging Team

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden
References: 
 >Manual Bindings (From: Jason Moore <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.