Ok, I got a lot of wires redirected and finally got the PtolemyFrame to
be referenced from the right click action handler. Now I can call
getModel() which works fine. I can also call Configuration.findEffigy()
which seems to work fine, except that it returns a PtolemyEffigy, not a
DocEffigy which is what GetDocumentationAction wants. It looks like
PtolemyEffigy and DocEffigy are not related to each other in the
hierarchy (they both extend Effigy). I'm using the same calls that are
used within GetDocumenationAction itself, but I get back a different
type of Effigy. Any ideas why and how I can get a DocEffigy? Note that
since there is nothing in the model at the time I call getModel() it
returns a blank model, which seems like it should be fine.
thanks,
chad
Edward A. Lee wrote:
I'm sure it's possible, but I think it will a little indirect.
In particular, the right click will have an event that can tell
you what Frame delivered the event. This will be instance of PtolemyFrame,
so you can cast it and call getModel(). Then call Configuration.findEffigy()
on that model...
Edward
At 02:08 PM 6/4/2007, you wrote:
Ok, that sounds good. Is there an easy method for getting the effigy of that
workflow? When I do a Configuration.findEffigy(<actor>), it returns null. I'm
not sure how to get a pointer to that open workflow from a random place in the code.
thanks,
chad
Edward A. Lee wrote:
I would suggest using the effigy for the model being viewed next to the
library... The main purpose of this effigy is to give hierarchy to window
managements, so that (for example), if you close a window, then all windows
that are conceptually sub-windows close...
Edward
At 10:22 AM 6/4/2007, Chad Berkley wrote:
Hi,
I'm trying to make it possible to get the documentation for an actor from the
actor library by right clicking on an actor. In the GetDocumentationAction
class, it asks the Configuration for an Effigy for the object you are trying to
open the documentation for. Since there is no effigy for an actor that is not
yet part of a model, it fails. Is there a way for me to add a ghost effigy
into the configuration so that the documentation can be created?
thanks,
chad
----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list. Please send administrative
mail for this list to: [EMAIL PROTECTED]
------------ Edward A. Lee
Chair of EECS and Robert S. Pepper Distinguished Professor
231 Cory Hall, UC Berkeley, Berkeley, CA 94720-1770
phone: 510-642-0253, fax: 510-642-2845
[EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal
------------
Edward A. Lee
Chair of EECS and Robert S. Pepper Distinguished Professor
231 Cory Hall, UC Berkeley, Berkeley, CA 94720-1770
phone: 510-642-0253, fax: 510-642-2845
[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]