• 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: Paul Schneider <email@hidden>
  • Date: Mon, 31 Aug 2009 14:23:45 -0500


Hi Jay,

I assume that you are testing this in Final Cut, rather than in Motion?

Final Cut will make copies of your custom parameter value objects. We will do this with the initial value, so that we have something to restore when the user clicks the "reset" button. We will do this with subsequent values that you set, so that we have something to restore if the user hits Undo.

If your object supports NSCopying, we will create copies using - copyWithZone. If your object does not support NSCopying, we will create copies by serializing and deserializing the object.

I am not sure why your original values are not being released eventually. Perhaps you are over-retaining it, or perhaps Final Cut is.

We will not send -parameterChanged for parameters where the plugin manages the UI. The OS routes events directly to your controls, so we don't see them. And you know that the user has changed the parameter, of course, since you are the one managing the UI.

I'm not sure what you mean by this:

2) I am getting a couple initWithCoder/encodeWithCoder messages for objs I
have not created. And when these objects are created my init method is not
called.


-initWithCoder is the init method that is called, when an object is created from a serialized representation. The runtime does not automatically call the -init method with no arguments. You should do your initialization in -initWithCoder.

- Paul


On Aug 31, 2009, at 1:48 PM, Jay Boyer wrote:

Thanks for the example.  I am getting some results I really do not
understand.

I created a class (UISaveRestore) that implements the NSCoding protocol. I
use this class to save a single string from several lists in our UI such as
the font the user selected (I don't save the entire list).


Here is my code from addParamaters

UISaveRestore *uiSaveRestore = [[[UISaveRestore alloc] init] autorelease];
[uiSaveRestore setType:SR_FONTLIST];
[_apiParam addCustomParameterWithName: [_bundle localizedStringForKey: @
DATE_FONT value:nil table: @"InfoPlist"]
parmId: ID_FONTLIST
defaultValue: uiSaveRestore
parmFlags: kFxParameterFlag_CUSTOM_UI];



The custom view just has a single pop up I fill with the font list

// here we initialize the font dropdown with the list of fonts (once)
NSPopUpButton *fontListDisplay = [_fontListView viewWithTag: UIT_FONTLIST];
if (_fInitFontList)
{
[fontListDisplay addItemsWithTitles:_arrayFonts];
_fInitFontList = false;
}


I am experiencing the following problems:

1) I do not get parameter changed messages when I change the selection in my
custom parameter font list.


2) I am getting a couple initWithCoder/encodeWithCoder messages for objs I
have not created. And when these objects are created my init method is not
called. Nor is my dealloc method called for these objs. I don't understand
why this is happening, or to be more precise why these objects are being
created in the first place.


3) When I save the project there is no serialization/encodeWithcoder call
for the UISaveRestore obj I explicitly create when I am adding my custom
parameter. There is a serialization call for an obj I didn't create.


4) My explicitly created obj never receives a dealloc message.

Thanks,

Jay



_______________________________________________
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

_______________________________________________ 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: "Jay Boyer" <email@hidden>)
 >Re: question on refreshing parameter data between instances. (From: Darrin Cardani <email@hidden>)
 >RE: question on refreshing parameter data between instances. (From: "Jay Boyer" <email@hidden>)

  • Prev by Date: Re: exit status 45
  • Next by Date: Re: exit status 45
  • 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