Re: Actor attributeChanged() methods and validating mutliple changes.

2006-02-16 Thread Edward A. Lee

At 07:24 AM 2/16/2006, Kevin Ruland wrote:
Is there any way for the actor be notified when the user decides all 
the changes are complete?


Not really... I'm not sure how one could do that...
You could check the parameters in preinitialize().

Edward




Edward A. Lee
Professor, Chair of the EE Division, Associate Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0253 or 510-642-0455, 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]


Re: Actor attributeChanged() methods and validating mutliple changes.

2006-02-16 Thread Kevin Ruland


To make matters worse, the output ports available depend on the contents 
of this metadata.  So the only way for the user to construct the 
workflow would be to configure, run  wait for failure, then construct 
the relationships and run again.


If I write my own parameter dialog pane would I have notification of 
commit?


Kevin


Edward A. Lee wrote:

At 07:24 AM 2/16/2006, Kevin Ruland wrote:
Is there any way for the actor be notified when the user decides all 
the changes are complete?


Not really... I'm not sure how one could do that...
You could check the parameters in preinitialize().

Edward




Edward A. Lee
Professor, Chair of the EE Division, Associate Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0253 or 510-642-0455, 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]


Re: Actor attributeChanged() methods and validating mutliple changes.

2006-02-16 Thread Edward A. Lee


My suggestion doesn't require any work at all in the actor...
Certainly I would not override NamedObject.executeChangeRequests().
It's just a change in when the edit parameters dialog issues the 
change request.


Edward


At 10:22 AM 2/16/2006, Kevin Ruland wrote:

Then would I also override NamedObject.executeChangeRequests() or 
would I have to have the actor implement ChangeListener then 
register this as a change listener on this?


class MyActor extends Source implements ChangeListener {

 public MyActor( CompositeEntity container, String name ) {
   super(container, name);
   addChangeListener(this);
 }

 public void changeExecuted( ChangeRequest change ) {
   // Do extra validation  d/l, etc.
 }

 public void changeFailed( ChangeRequest change ) {
  // nothing?
  return;
 }

}

I think I saw the NamedObj uses a list of WeakReferences for the 
listeners so I don't have to unregister in a finalizer, right?


How would this work when reading in a moml which contains one of 
these actors already configured?  Would it still get only one change 
request, or would it receive multiples?


Kevin

Edward A. Lee wrote:


As I recall, the current dialog pane issues the change request for 
a parameter

change when the parameter's editing widget loses the focus.  I believe the
reason for this was that there was because there are several ways that a
dialog might get closed, and Swing is not rigorous about notifications
(or, perhaps more likely, I found the documentation incomprehensible and
couldn't get it to work).

I'm open to a change in the dialog box that would issue the change
request only when an Apply or OK button is pressed...  This would probably
solve the problem...

Edward

At 09:36 AM 2/16/2006, Kevin Ruland wrote:

To make matters worse, the output ports available depend on the 
contents of this metadata.  So the only way for the user to 
construct the workflow would be to configure, run  wait for 
failure, then construct the relationships and run again.


If I write my own parameter dialog pane would I have notification 
of commit?


Kevin


Edward A. Lee wrote:

At 07:24 AM 2/16/2006, Kevin Ruland wrote:
Is there any way for the actor be notified when the user decides 
all the changes are complete?


Not really... I'm not sure how one could do that...
You could check the parameters in preinitialize().

Edward




Edward A. Lee
Professor, Chair of the EE Division, Associate Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
[EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal



Edward A. Lee
Professor, Chair of the EE Division, Associate Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
[EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal



Edward A. Lee
Professor, Chair of the EE Division, Associate Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0253 or 510-642-0455, 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]


OSX Installation

2006-02-16 Thread Joe Porter
I'm trying to install Ptolemy 5.0.1 on Mac OSX (10.3.9). I used
the ZeroG installer, which seems to have gone very smoothly. My
java version is 

java -version
java version 1.4.2_09
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-233)
Java HotSpot(TM) Client VM (build 1.4.2-56, mixed mode)

Any attempts to run anything in the installed directory fail.
Originally, I was getting some cryptic messages about LAX and Java
versions. I edited vergil-full.app/Contents/Info.plist and
changed the JVMVersion key to 1.4*. Note that to see all of
this I have to run 

vergil-full.app/Contents/MacOS/vergil-full directly from the
terminal. Otherwise the application tries to start up and then
mysteriously exits.

After making the above-described change, here's what I get:

$ vergil-full.app/Contents/MacOS/vergil-full 
Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)

Stack Trace:
java.lang.NoClassDefFoundError: ptolemy/vergil/VergilApplication
 at ptolemy.actor.gui.jnlp.MenuApplication.main(MenuApplication.java:119)
 at ptolemy.actor.gui.jnlp.FullApplication.main(FullApplication.java:64)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at com.zerog.lax.LAX.launch(DashoA8113)
 at com.zerog.lax.LAX.main(DashoA8113)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at apple.launcher.LaunchRunner.run(LaunchRunner.java:88)
 at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
 at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)
Segmentation fault

Does anyone have any ideas what might be the problem? Did I miss
something? It looks like the installer left me as the owner of
everything, though there could be individual permission problems in any
of the many files. I'm not sure where to go from here.

Thanks,
-Joe Porter