When you delete a relation, then any attributes it contains are automatically deleted, in the sense that there will be no more references to them accessible from anywhere, so they will be garbage collected. You shouldn't need to delete them explicitly.
As for when you right click on an actor, the following are all subclasses of ptolemy.kernel.util.Attribute, and hence can be put inside an actor to customize the GUI interaction for that actor in various ways:
ptolemy.vergil.basic.NodeControllerFactory: An attribute that you can subclass to determine what the GUI does when you right click or double click on an actor. This is not all that easy to use, but there are lots of examples of "Controllers" in ptolemy.vergil.
ptolemy.actor.gui.EditorPaneFactory: An attribute that you can put in an actor to create a custom panel to be displayed when you "Configure" the actor. That is, if you don't specify a NodeControllerFactory, then by default double click invokes "Configure" and right-click offers at least "Configure". What "Configure" does can be customized by creating a subclass of this attribute. This is much easier to use than creating a custom NodeController.
ptolemy.actor.gui.InsideEntityEditorPaneFactory: A subclass that can serve as an example.
ptolemy.actor.gui.TableauFactory: An attribute that can be subclassed and placed inside an actor to customize what happens when you look inside an actor. This one is also easy to use.
Hope this helps...
Edward
At 04:00 PM 12/27/2004 +1100, jagan wrote:
Hello Edward,
Thank you very much for your spontaneous advise. With this approach I was able to create relation with the predefined properties. I would like to know which function I need to modify in order to delete the property whenever I remove relation from the graphical view (design stage).
Could you also tell me which are the functions called when I right click on the actor during the design stage for the configuration of that actor?
with regards,
Jagan Kommineni
Edward A. Lee wrote:
The easiest way to do this, I think, would be to subclass TypedCompositeActor and override the newRelation() method to return a relation that contains the parameter you are interested in. You would then want to create a new configuration that uses your subclass rather than TypedCompositeActor.
Edward
At 12:12 PM 12/22/2004 +1100, jagan wrote:
References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
In-Reply-To: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hi Ilkay, Christpher,
Would you mind to give me some information for adding properties (attributes) to the relation at the time when actrs connecting graphically. I know it is possible to add properties dynamically by right clicking during the design phase. In the GriddLeS project I need to pass some information which is more integrated to the relation rather than actor. I want this happen automatically when user tries to connect actors. I will appreciate if you could give some clues in this aspect.
with regards,
Jagan Kommineni
_______________________________________________ kepler-dev mailing list [EMAIL PROTECTED] http://www.ecoinformatics.org/mailman/listinfo/kepler-dev
------------ Edward A. Lee, Professor 518 Cory Hall, UC Berkeley, Berkeley, CA 94720 phone: 510-642-0455, fax: 510-642-2718 [EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal
------------ Edward A. Lee, Professor 518 Cory Hall, UC Berkeley, Berkeley, CA 94720 phone: 510-642-0455, fax: 510-642-2718 [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]