Commit 0f29595a authored by Chad Barb's avatar Chad Barb

Modified acceptable input for string fields to reflect tcl behavior

parent e34dabfa
...@@ -80,13 +80,14 @@ class MagicTextField implements TextListener, FocusListener { ...@@ -80,13 +80,14 @@ class MagicTextField implements TextListener, FocusListener {
// alphaAllowed and its alphanumeric (or '-') // alphaAllowed and its alphanumeric (or '-')
// (but not numeric or '-' if it is the first char) // (but not numeric or '-' if it is the first char)
// numAllowed and its numeric or "." // numAllowed and its numeric or "."
if (alphaAllowed && c == ' ') { /* if (alphaAllowed && c == ' ') {
rep = rep.replace(' ', '-'); rep = rep.replace(' ', '-');
i++; i++;
} else if ((alphaAllowed && } else */
(isAlphic( c ) || (i != 0 && (isNumeric(c) || c == '-')))) || if ((alphaAllowed &&
(isAlphic( c ) || (i != 0 && (isNumeric(c)/* || c == '-'*/)))) ||
(specialAllowed && i != 0 && (specialAllowed && i != 0 &&
(c == '_' || c == '+')) || (c == '_' || c == '-' || c == '+')) ||
(numAllowed && (numAllowed &&
(isNumeric( c ) || c == '.'))) { (isNumeric( c ) || c == '.'))) {
// legit. // legit.
......
...@@ -11,7 +11,7 @@ public class NodePropertiesArea extends PropertiesArea ...@@ -11,7 +11,7 @@ public class NodePropertiesArea extends PropertiesArea
{ {
super(); super();
addProperty("name", "name:","", true, false); addProperty("name", "name:","", true, false);
addProperty("hardware", "hardware:","<auto>", true, false ); addProperty("hardware", "hardware:","<auto>", true, true );
addProperty("osid", "os id:","<auto>", true, true ); addProperty("osid", "os id:","<auto>", true, true );
} }
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment