pub fn resolve(
        &self,
        name: AvmString<'gc>,
        activation: &mut Activation<'_, 'gc, '_>,
    ) -> Result<CallableValue<'gc>, Error<'gc>> {
        if self.locals().has_property(activation, name) {
            return self
                .locals()
                .get(name, activation)
                .map(|v| CallableValue::Callable(self.locals_cell(), v));
        }
        if let Some(scope) = self.parent() {
            return scope.resolve(name, activation);
        }

        Ok(CallableValue::UnCallable(Value::Undefined))
    }
/// Resolve a particular value in the scope chain and the object which this value would expect as its `this` parameter if called.
///
/// Because scopes are object chains, the same rules for `Object::get`
/// still apply here. This function is allowed to yield `None` to indicate
/// that the result will be calculated on the AVM stack.
Resolve a particular value in the scope chain and the object which this value would expect as its `this` parameter if called.
Because scopes are object chains, the same rules for `Object::get`
still apply here. This function is allowed to yield `None` to indicate
that the result will be calculated on the AVM stack.
Resolve a particular value in the scope chain and the object which this value would expect as its ` this ` parameter if called . Because scopes are object chains the same rules for ` Object :: get ` still apply here . This function is allowed to yield ` None ` to indicate that the result will be calculated on the AVM stack .
pub fn resolve(
        &self,
        name: AvmString<'gc>,
        activation: &mut Activation<'_, 'gc, '_>,
    ) -> Result<CallableValue<'gc>, Error<'gc>> {
        if self.locals().has_property(activation, name) {
            return self
                .locals()
                .get(name, activation)
                .map(|v| CallableValue::Callable(self.locals_cell(), v));
        }
        if let Some(scope) = self.parent() {
            return scope.resolve(name, activation);
        }
        Ok(CallableValue::UnCallable(Value::Undefined))
    }
pub fn resolve ( & self , name : AvmString < ' gc > , activation : & mut Activation < ' _ , ' gc , ' _ > , ) -> Result < CallableValue < ' gc > , Error < ' gc > > { if self . locals ( ) . has_property ( activation , name ) { return self . locals ( ) . get ( name , activation ) . map ( | v | CallableValue :: Callable ( self . locals_cell ( ) , v ) ) ; } if let Some ( scope ) = self . parent ( ) { return scope . resolve ( name , activation ) ; } Ok ( CallableValue :: UnCallable ( Value :: Undefined ) ) }
Resolve a particular value in the scope chain and the object which this value would expect as its `this` parameter if called.
Resolve a particular value in the scope chain and the object which this value would expect as its ` this ` parameter if called .
&self
name
AvmString<'gc>
activation
&mut Activation<'_, 'gc, '_>
&self
name
AvmString<'gc>
activation
&mut Activation<'_, 'gc, '_>