//=====================================================================
        /// <summary>
        ///
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public string updateValue(string value)
        {
            string tmp = value.Replace("\n", "");

            if (tmp.Equals(""))
            {
                value = DefaultValue;
            }

            //when this is a numeric value check it's range
            if ((_typedValue.isScalar()) && (!_typedValue.isTextType()) && (_typedValue.baseType() != TTypedValue.TBaseType.ITYPE_BOOL))
            {
                try
                {
                    double dValue = Convert.ToDouble(value);
                    if (TypedValue is TInitValue)
                    {
                        TInitValue initValue = TypedValue as TInitValue;

                        if (dValue > initValue.getMax().asDouble())
                        {
                            //value = initValue.getMax().asString();
                            value = DefaultValue;
                        }
                        if (dValue < initValue.getMin().asDouble())
                        {
                            //value = initValue.getMin().asString();
                            value = DefaultValue;
                        }
                    }
                }
                catch
                {
                    value = Value;
                }
            }
            _typedValue.setValue(value);

            return(value);
        }