diff --git a/core/src/avm2/globals/flash/text/textfield.rs b/core/src/avm2/globals/flash/text/textfield.rs index 4e53c0661..f2c4c53d8 100644 --- a/core/src/avm2/globals/flash/text/textfield.rs +++ b/core/src/avm2/globals/flash/text/textfield.rs @@ -1276,6 +1276,24 @@ pub fn set_max_chars<'gc>( Ok(Value::Undefined) } +pub fn restrict<'gc>( + _activation: &mut Activation<'_, 'gc>, + _this: Option>, + _args: &[Value<'gc>], +) -> Result, Error<'gc>> { + tracing::warn!("TextField.restrict - not yet implemented"); + Ok(Value::Null) +} + +pub fn set_restrict<'gc>( + _activation: &mut Activation<'_, 'gc>, + _this: Option>, + _args: &[Value<'gc>], +) -> Result, Error<'gc>> { + tracing::warn!("TextField.restrict - not yet implemented"); + Ok(Value::Undefined) +} + /// Construct `TextField`'s class. pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc>> { let class = Class::new( @@ -1325,6 +1343,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> ("maxScrollV", Some(max_scroll_v), None), ("maxChars", Some(max_chars), Some(set_max_chars)), ("multiline", Some(multiline), Some(set_multiline)), + ("restrict", Some(restrict), Some(set_restrict)), ("scrollH", Some(scroll_h), Some(set_scroll_h)), ("scrollV", Some(scroll_v), Some(set_scroll_v)), ("selectable", Some(selectable), Some(set_selectable)),