[ 1564520 ] Inventory Move: can't select existing attributes
http://sourceforge.net/tracker/index.php?func=detail&aid=1564520&group_id=176962&atid=879332
This commit is contained in:
parent
2e1260d015
commit
423c2f57fa
|
@ -536,6 +536,31 @@ public final class Env
|
|||
return 0;
|
||||
} // getContextAsInt
|
||||
|
||||
/**
|
||||
* Get Context and convert it to an integer (0 if error)
|
||||
* @param ctx context
|
||||
* @param WindowNo window no
|
||||
* @param context context key
|
||||
* @param onlyWindow if true, no defaults are used unless explicitly asked for
|
||||
* @return value or 0
|
||||
*/
|
||||
public static int getContextAsInt(Properties ctx, int WindowNo, String context, boolean onlyWindow)
|
||||
{
|
||||
String s = getContext(ctx, WindowNo, context, onlyWindow);
|
||||
if (s.length() == 0)
|
||||
return 0;
|
||||
//
|
||||
try
|
||||
{
|
||||
return Integer.parseInt(s);
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
s_log.log(Level.SEVERE, "(" + context + ") = " + s, e);
|
||||
}
|
||||
return 0;
|
||||
} // getContextAsInt
|
||||
|
||||
/**
|
||||
* Get Context and convert it to an integer (0 if error)
|
||||
* @param ctx context
|
||||
|
|
Loading…
Reference in New Issue