[kepler-dev] Disabling run....

Rod Spears rods at ku.edu
Thu Sep 23 08:58:18 PDT 2004


If I try to change the icon this way:

_attachText("_iconDescription", getReadyIcon());

The icon doesn't update visually unless I grab it and move it. Should I 
be changing the icon is a different manner?

Rod

Edward A Lee wrote:

> At 08:39 AM 9/23/2004 -0500, Rod Spears wrote:
>
>> Is there a way to actually stop or delay a model from running when 
>> all the actors are not yet ready?
>
>
> Sure... Write the actor so it doesn't return from initialize() until
> it's ready... Each run of a model proceeds in an independent thread,
> so this shouldn't hang up the UI.  You probably want to time out,
> however, and also check for the stop button being pushed (the
> protected variable _stopRequested from ptolemy.actor.AtomicActor
> is available to all atomic actors...
>
>
>> Also, (just so the question doesn't get lost) is there an example of 
>> an actor interacting with the progress meter? Or is that not possible 
>> because of your previous statment.
>
>
> I don't know of such an example, but I'm sure it's possible.
> The hard part is going to be to obtain somehow a reference to the
> progress meter.  The actor by default has no references that lead
> to the UI, since this will create a dependence in the Java code.
>
> Looking at the following actor will show how you can
> get a reference to the TableauFrame, which is the top-level window
> displaying the actor:
>
>   ptolemy.vergil.actor.lib.VisualModelReference
>
> The TableauFrame is a subclass of ptolemy.gui.Top, which contains
> an instance of ptolemy.gui.StatusBar, which contains the progress
> bar...
>
> On quick glance, however, I'm not sure the API of Top is rich enough
> to give access to the StatusBar... It probably needs one or more
> methods to control what is displayed there... If you suggest changes,
> I'll gladly fold them in (assuming they conform with our style guide ;-)
>
> Edward
>
>
>
> ------------
> Edward A. Lee, Professor
> 518 Cory Hall, UC Berkeley, Berkeley, CA 94720
> phone: 510-642-0455, fax: 510-642-2739
> eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal
>




More information about the Kepler-dev mailing list