[kepler-dev] dynamic parameters

tkd thinkalldifferently at gmail.com
Fri Dec 18 08:21:11 PST 2009


Hi Hackers,

I'm working on parsing some xml files, which have to define new 
parameters, visible and modifiable by the users via the ParametersDialog.
These parameters can not be known at advance, so I have to create them 
dynamically. These parameters have a name, given by the xml tag, one or 
more values.
I didn't found how to do this and I'm not confortable in understanding 
the mecanism of writing in a moml file. I found some things about 
configurable attributes but I don't see how to use it.

The code below is a simplest example of what I would like to do, but I'm 
quite sure that I used a wrong way, isn't it ?

Thanks in advance for some help.

tkd




for (int i=0; i<parser.size(); i++)
{
   List<String> content = parser.get(i);
   Parameter attr = null;

   try
   {
     attr = new Parameter(this, content.get(0));
     attr.setToken( new StringToken(content.get(2)) );
     attr.exportMoML();
     attr.validate();
     attr.setContainer( this );

   } catch (NameDuplicationException e)
   {
     e.printStackTrace();
   }
}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercury.nceas.ucsb.edu/kepler/pipermail/kepler-dev/attachments/20091218/7a74b347/attachment-0002.html>


More information about the Kepler-dev mailing list