Open cxbrooks opened 15 years ago
Below is a long thread that discusses Model Model editors and output ports.
This RFE will not be fixed for 8.0, but I wanted to document it.
Edward wrote: Bert's suggestion would be a good solution... A better solution would be to mofify the modal classes so that they handle output ports as if they were also input ports. This would be "right" solution, but not trivial to execute.
Edward
Bert Rodiers wrote:
Hello Christopher,
Although the icons look the same, there is a semantic difference between output ports and input-output ports in model models. In the controller they are both input-output ports. But in the refinements the distinction is made. Removing the icon is hence not the solution.
It also took me some time before I understood the current behavior.
To avoid confusion one might for example consider to still make the output-ports in the modal model input-output ports, but show them visually as output ports and somewhere document the special behavior (that a guard can reference the outputs of a refinements) of these "output" ports in modal models.
Regards, Bert
2009/8/11 Christopher Brooks <cxh@ eecs.berkeley.edu>:
The problem is that if you have a modal model, and you press on the output port tool bar button, then the port that is created is not an output port, but an input/output port. This is confusing to the user because the user sees the output icon but an input/output port is created? The reality is that a modal model editor cannot have an output port so having an output port button is incorrect.
Does this make sense?
_Christopher
Edward A. Lee wrote:
It is not a bug that output ports are also input ports. The reason is that a guard can reference the outputs of a refinements. So I'm not sure what problem we are solving (?).
Edward
Christopher Brooks wrote:
Hi Edward,
I looked into the issue where the Modal Models editor has a button to create output ports, but when that button is pressed, then an input/output port is created instead. The details about why this happens are at:
http://chess.eecs.berkeley.edu/ptolemy/listinfo/ptolemy/2009-June/011580.html
WithIconGraphController needs to check to see if the model is a ModalController and adjust the location of the input/output port accordingly. FSMGraphController needs to exclude the output icon if the model is a ModalController.
Probably the way to make these changes is to have a parent of ModalController implement a method calls hasOutputPorts() or something.
Does this seem right to you?
_Christopher
Note: the issue was created automatically with bugzilla2github tool
Original bug ID: BZ#301 From: @cxbrooks Reported version: 8.1.devel CC: pt-dev@chess.eecs.berkeley.edu