[kepler-dev] Help with Pop Up Box in Kepler

Daniel Crawl crawl at sdsc.edu
Tue Mar 24 15:33:02 PDT 2009


Hi Subhav,

I can drag-n-drop this actor without errors after saving it
in my library.

Do you get the same error with kepler-trunk?

  --dan


subhav mital wrote:
>
>     Hey,
>
>     I followed the instructions given by David to create the actor and
>     ran the usual commands from command line using ant to create my
>     module.
>
>     To instantiate the actor in Kepler, I used org.UserIp.UserIp.
>     However when I close Kepler and re-run it, I get some errors such as:
>
>
>  "Change Failed: Cannot create entity without a class name.in 
> <http://name.in/> [external stream] at line 1 column 29.
>  
>
>
>     -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
>     /**
>      * 
>      */
>     package org.UserIp;
>
>     import javax.swing.JOptionPane;
>
>     import ptolemy.actor.lib.LimitedFiringSource;
>     import ptolemy.data.StringToken;
>     import ptolemy.data.expr.Parameter;
>     import ptolemy.data.type.BaseType;
>     import ptolemy.kernel.CompositeEntity;
>     import ptolemy.kernel.util.IllegalActionException;
>     import ptolemy.kernel.util.NameDuplicationException;
>
>     /**
>      * @author Subhav
>      *
>      */
>     public class UserIp extends LimitedFiringSource {
>     public Parameter user;
>     /**
>     * @param container
>     * @param name
>     * @throws NameDuplicationException
>     * @throws IllegalActionException
>     */
>     public UserIp(CompositeEntity container, String name)
>     throws NameDuplicationException, IllegalActionException {
>     super(container, name);
>     output.setTypeEquals(BaseType.STRING);
>     user = new Parameter(this,"user");
>     }
>
>     /* (non-Javadoc)
>     * @see ptolemy.actor.lib.Source#fire()
>     */
>     @Override
>     public void fire() throws IllegalActionException {
>     super.fire();
>     String reply = JOptionPane.showInputDialog("Please enter value");
>       if (reply == null)
>         return;
>
>       //output.s
>       output.broadcast(new StringToken(reply));
>     }
>
>     }
>     --------------------------------------------------------------------------------------------------------------------------------------------------------
>
>
> Please help.
>
>
>     Thanks!
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at kepler-project.org
> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev
>   



More information about the Kepler-dev mailing list