Re: FxPlug - update addPopupMenuWithName with new menu entries?
Re: FxPlug - update addPopupMenuWithName with new menu entries?
- Subject: Re: FxPlug - update addPopupMenuWithName with new menu entries?
- From: Paul Schneider <email@hidden>
- Date: Thu, 18 Mar 2010 15:18:12 -0500
Hi Bob,
FCP doesn't support changing the contents of the standard popup parameter, so if you need this functionality, you need to make custom UI, which it sounds like you're doing.
We will re-render if you change one of your parameters. Are you changing any parameter value in response to your popup action?
One trick you can use is to have a hidden parameter whose only purpose is to trigger re-renders. But it sounds like the popup changes the way you render, and so its state should be stored with the project as well.
You could make a custom parameter whose value type is NSNumber, and whose custom UI is a popup control; this shouldn't be too hard, and will give you what you want.
If you prefer the file chooser and the popup to be part of the same control, you can do that as well. You can either make one custom parameter type that contains both the string and popup value, or you could use the one custom UI to drive two simpler parameters, one of which is hidden.
- Paul
On Mar 18, 2010, at 2:16 PM, Robert Monaghan wrote:
> Hi Everyone,
>
> I have an FxPlug that is loading a plist file with a set of different preferences. I want to have a popup menu just below this file-open button,
> that is dynamically populated with the assorted choices available from the plist file. Here is where I get stuck:
>
> Is there a way to replace menu entries with an already created popup menu?
> I need to dynamically generate new popup menu items to reflect changes after the file is selected. (I am using Scrolling Rich Text example to handle the file IO).
> There doesn't seem to be a way to update the contents of the popup menu after it is created. There doesn't appear to be a way to remove this control and replace it.
>
> As a result, I have added a Popup button to the file open panel custom UI view so that I can drive the re-population with a NSArrayController.
> However it doesn't seem to cause renderOutput to be triggered. I would go this route, as everything works exactly the way I want.
> Even adding a "startAction/endAction" call doesn't help, when I set my custom parameter (which is nothing more than a NSNumber with the popup menus' selection).
> Strangely, the File Open button in the very same custom UI view does trigger a render. Naturally there isn't anything I can spot to cause the issue.
> Should I have a separate view for each custom parameter??
>
> What is the best way to go about this?
>
> bob..
>
> Robert Monaghan
> Glue Tools LLC
> 1024A Quinientos St.
> Santa Barbara, CA, 93103
> United States
>
> tel: +1 805 456 7997
> fax: +1 805 456 7998
>
> www.gluetools.com
>
> _______________________________________________
> 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