At 09:00 AM 2/17/2004 -0800, Chad Berkley wrote:
Hi,

I'm trying to change the default action for double clicking (or choosing 'configure' from the right click menu) on an actor. It appears that in the class ConfigureAction, EditParametersDialog is hard coded to be the default editor for configuration. Is there anyway to circumvent this so I can replace EditParametersDialog? I know I can change the editor for a specific actor, but I'd like to change the default for all of them and this seems like the place to do it.

thanks,
chad

As far as I recall, there is nothing built in to allow this customization, but it's a good idea to allow something like that. The "right" way to do this would be to define an attribute that could be put into the configuration file. E.g., you could subclass Attribute to create, say, DialogFactoryAttribute. Then create an instance of this in the configuration file named, say, "_configureDialogFactory". Then modify the code in the ConfigureAction so that if there is such an attribute in the configuration, then use that attribute to create the dialog rather than using the hardwired default. If you build that and follow our coding conventions, we would be happy to fold it into the Ptolemy II tree...

Edward



------------
Edward A. Lee, Professor
518 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0455, fax: 510-642-2739
[EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal


---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]

Reply via email to