[kepler-dev] Disabling run....

Rod Spears rods at ku.edu
Thu Sep 23 06:39:09 PDT 2004


Ok, that is very helpful. It would make sense to change the actor's icon 
to represent an "unready state."

But since some models could be large and not all fit in the canvas area 
or they may be in a compiste actor, the user may not "know" that the 
model is not yet ready to be run.

Is there a way to actually stop or delay a model from running when all 
the actors are not yet ready?

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.

Rod


Edward A Lee wrote:

>
> We have gone to considerable effort to ensure that models can be run
> headless (without a graphical display). In order to do this, it is 
> necessary
> that actors not have references to anything in Swing or in the UI.
>
> Nonetheless, there are mechanisms. Actors can include attributes
> that reference the UI, in which case we filter out these attributes
> when we run headless. The attributes that change what happens when
> you "look inside," for example, are of this type. So are the attributes
> that define the icon (which can be changed at run time, as done routinely
> in the wireless domain).
>
> If you look at the package dependencies, you will see that there
> are no import statements in ptolemy.actor.lib that reference 
> ptolemy.vergil
> or java.awt or javax.swing...  Just having such import statements
> means you can't run these actor headless...  However, actors
> in ptolemy.actor.lib.gui do have such imports. These cannot be used
> in models that run headless (in fact, including one of them in our
> test suite creates problems with the nightly build).
>
> So whatever you choose to do about this, I recommend paying attention
> to package dependencies. It's easy to add "import" statements.
> It's very hard to remove them...
>
> Edward
>
>
> At 03:56 PM 9/22/2004 -0700, Chad Berkley wrote:
>
>> Hey Rod,
>>
>> I'm not sure how to disable the run button, but it like the indicator 
>> showing that the workflow isn't ready to run should come from the 
>> actor that's delaying it.  Maybe the actor should be greyed out and 
>> have a little progress meter showing below it.  I think it's 
>> important to show the user why the workflow currently isn't 
>> executable.  I haven't tried to alter the execution environment (i.e. 
>> the run button) from a model, but I'm kind of guessing that there is 
>> no interface to do so...maybe one of the ptolemy folks can shed some 
>> light on this.
>>
>> chad
>>
>> On Sep 22, 2004, at 3:32 PM, Rod Spears wrote:
>>
>>> When we open a workflow there will be times that data may be loading 
>>> on a separate thread and therefore all the actors are not ready to 
>>> execute. Is there a way to disable the "Run" button or somehow tell 
>>> Ptolemy that "we" all aren't ready yet?
>>>
>>> Also, where can I find an example of how to make the progress meter 
>>> move from within an actor?
>>>
>>> Thanks,
>>> Rod
>>>
>>>
>>> -- 
>>>
>>>
>>> <image.tiff>
>>> Rod Spears
>>> Biodiversity Research Center
>>> University of Kansas
>>> 1345 Jayhawk Boulevard
>>> Lawrence, KS 66045, USA
>>> Tel: 785 864-4082, Fax: 785 864-5335
>>> <jayhawk.gif>
>>
>> </blockquote></x-html>
>
>
> ------------
> 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