Bindings, and Core Image
Bindings, and Core Image
- Subject: Bindings, and Core Image
- From: Ron Aldrich <email@hidden>
- Date: Fri, 13 Apr 2007 15:48:10 -0700
Folks,
I'm having a bit of a problem, using bindings with a core image
filter that I'm working on.
The filter is actually constructed as a composite of several other
filters, which it uses bindings to keep in sync.
The problem I'm having is that changes to one of it's parameters (in
this case, inputOrigin) are not reflected by calls to outputImage.
inputOrigin is bound to a user interface element, which allows the
effect to be positioned on the image.
What I would expect to have happen is that when inputOrigin is
changed, it would trigger a change notification for outputKeyColor,
which would then trigger a change notification for outputImage.
What actually happens is that the change notification for
outputKeyColor occurs, but the notification for outputImage does not.
+ (void) initialize
{
[self setKeys: [NSArray arrayWithObjects:
@"inputImage",
@"inputOrigin",
// ...
nil]
triggerChangeNotificationsForDependentKey: @"outputKeycolor"];
[self setKeys: [NSArray arrayWithObjects:
@"inputImage",
// ...
@"outputKeycolor",
nil]
triggerChangeNotificationsForDependentKey: @"outputImage"];
// ...
}
If I do the following:
[self setKeys: [NSArray arrayWithObjects:
@"inputImage",
@"inputOrigin",
// ...
@"outputKeycolor",
nil]
triggerChangeNotificationsForDependentKey: @"outputImage"];
The notification for outputImage then occurs, but at the wrong time -
before outputKeyColor has been resolved.
Currently, outputImage is using setValue: forKey: to connect all of
the filter stack's input and output images - this is because core
image throws an exception if I bind to a filter's outputImage without
first having established all of its inputs.
Thanks for your time,
Ron Aldrich
Software Architects, Inc.
_______________________________________________
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