• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Bindings, and Core Image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Bindings, and Core Image
      • From: Ron Aldrich <email@hidden>
  • Prev by Date: Re: making an NSView with scrollbars "inactive"
  • Next by Date: Re: Sorting Array Alphabetically
  • Previous by thread: Re: making an NSView with scrollbars "inactive"
  • Next by thread: Re: Bindings, and Core Image
  • Index(es):
    • Date
    • Thread