Cocoa objects in Quartz Composer
Cocoa objects in Quartz Composer
- Subject: Cocoa objects in Quartz Composer
- From: Daniel Gobera <email@hidden>
- Date: Sat, 25 Nov 2006 10:09:53 -0800
Hi. I asked this question on the Quartz Composer list, but no one
answered, o I figured I would ask here.
I want to make some data available from my Cocoa application to a
Quartz composition that will render the view. The data consists of an
array of objects of a custom class, something like:
@interface CustomObject : NSObject {
NSString *name;
NSImage *image;
}
- (NSString *)name;
- (NSImage *)image;
@end
On my composition, I declared a root input for the structure. It
receives an NSArray of CustomObjects, so it works fine and I can get
any object using the Structure Index Member patch. The problem is to
extract data from the resulting CustomObject. I tried using the
"Structure Key Member" patch with key "name" to extract the name, but
I get blank. How does that patch work? What method is it calling, if
any? I would expect it to call valueForKey:@"name" on my custom
object, which in turn would call the "- name" method, but that
doesn't seem to be the case.
Any ideas? Would the only option be to implement my CustomObject as
an NSMutableDictionary? I don't want the model design be influenced
by restrictions of the view.
Thanks,
Daniel
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden