• 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
Re: question on refreshing parameter data between instances.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question on refreshing parameter data between instances.


  • Subject: Re: question on refreshing parameter data between instances.
  • From: Steve Christensen <email@hidden>
  • Date: Fri, 14 Aug 2009 18:56:10 -0700

On Aug 14, 2009, at 6:13 PM, Brian Gardner wrote:

Good point, Steve.

It does sound like arrays were a bad idea. I do like Darrin's suggestion of using NSNotifications. Seems more stable.

I'll assume that NSNotifications doesn't have a similar issue, and will work properly even if the particular clip isn't currently being directly worked on. (Is that a valid assumption?)

I don't remember offhand if NSNotificationCenter retains notification observers or not. I would suppose that it would so it doesn't walk off into the weeds if an observer were to go away without unregistering, but you should see if that is, indeed, the case. If it is you would need to figure out a way to make sure the instance is properly disposed.


I'm not sure what you meant by "the particular clip isn't currently being directly worked on" part. If it's referring to making sure that the global settings are correctly propagated into plugin instances not yet created, or those that were hypothetically created at some point but have since been destroyed since they're not "being used," then, no, that won't happen because those instances don't exist at the time the notification is sent out.

It may be that a better solution would be to have a dirty flag as an instance variable and mark all plugin instances as "dirty" when they're initialized so that the current global settings can be stuffed into the parameters when they're first created and/or replacing the "invalid" parameter value(s) with the current "good" ones from the singleton.

Note that this still does not address how the singleton gets the "good" values in the first place.

This makes the assumption that a plugin instance is created for each clip that uses your effect and that the instance will hang around in memory until either that clip is removed, the project is closed or the host app quits. I don't know the underlying architecture but it's just as likely that plugin instances are created as needed and then destroyed if you're not currently working with a particular clip.

If you create an array and add instances to it, you -could- end up with a bunch of stale items that no longer refer to real clips and/ or conflict with the plugin instance that now manages your effect for a particular clip.
...

steve
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >how trims & cuts effect reference image wells (From: Brian Gardner <email@hidden>)
 >Re: how trims & cuts effect reference image wells (From: Darrin Cardani <email@hidden>)
 >question on refreshing parameter data between instances. (From: "Jay Boyer" <email@hidden>)
 >Re: question on refreshing parameter data between instances. (From: Brian Gardner <email@hidden>)
 >Re: question on refreshing parameter data between instances. (From: Darrin Cardani <email@hidden>)
 >Re: question on refreshing parameter data between instances. (From: Brian Gardner <email@hidden>)
 >Re: question on refreshing parameter data between instances. (From: Darrin Cardani <email@hidden>)
 >Re: question on refreshing parameter data between instances. (From: Brian Gardner <email@hidden>)
 >Re: question on refreshing parameter data between instances. (From: Darrin Cardani <email@hidden>)
 >Re: question on refreshing parameter data between instances. (From: Brian Gardner <email@hidden>)
 >Re: question on refreshing parameter data between instances. (From: Steve Christensen <email@hidden>)
 >Re: question on refreshing parameter data between instances. (From: Brian Gardner <email@hidden>)

  • Prev by Date: FCP XML marker comment limit?
  • Next by Date: FCSvr 1.5 developer documentation?
  • Previous by thread: Re: question on refreshing parameter data between instances.
  • Next by thread: Re: question on refreshing parameter data between instances.
  • Index(es):
    • Date
    • Thread