Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#331 have default values for (required) parameters

closed-invalid
Miguel
Applet (71)
5
2005-11-28
2005-10-26
Anonymous
No

The applet requires some parameters, this is not always
very useful please provide default values

if we do this, we dont have to worry about missing
params...

public String getParameter(String paramName)
{
String val = super.getParameter(paramName);
if ("progressbar".equals(paramName) && val ==
null) val = "true";
if ("progresscolor".equals(paramName) && val ==
null) val = "blue";
if ("boxmessage".equals(paramName) && val
== null) val = "...";
if ("boxbgcolor".equals(paramName) && val
== null) val = "black";
if ("boxfgcolor".equals(paramName) && val
== null) val = "white";
return val;
}

Discussion

  • Miguel
    Miguel
    2005-11-28

    Logged In: YES
    user_id=1050060

    These are parameters that are part of the HTML code. The
    JmolApplet cannot supply params that should be part of your
    .html page.

    Use the Jmol.js JavaScript library and your problems will go
    away.

     
  • Miguel
    Miguel
    2005-11-28

    • status: open --> closed-invalid