Re: question on refreshing parameter data between instances.
site_archiver@lists.apple.com Delivered-To: Pro-apps-dev@lists.apple.com Hi Jay, I assume that you are testing this in Final Cut, rather than in Motion? I'm not sure what you mean by this: - 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. Here is my code from addParamaters The custom view just has a single pop up I fill with the font list I am experiencing the following problems: 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 (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/pro-apps-dev/pschneider%40apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/pro-apps-dev/site_archiver%40lists.ap... 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. 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. 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). 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]; // 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; } 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. This email sent to pschneider@apple.com This email sent to site_archiver@lists.apple.com
participants (1)
-
Paul Schneider