[kepler-dev] Help with Pop Up Box in Kepler
subhav mital
mital.subhav at gmail.com
Tue Mar 24 12:34:02 PDT 2009
>
> 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 [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!
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercury.nceas.ucsb.edu/kepler/pipermail/kepler-dev/attachments/20090324/c9b3d3ae/attachment.html>
More information about the Kepler-dev
mailing list