# This + extends + scope

**URL:** https://forum.kirupa.com/t/this-extends-scope/233011
**Category:** Uncategorized
**Created:** [July 19, 2007, 1:08pm UTC](https://forum.kirupa.com/t/this-extends-scope/233011 "2007-07-19T13:08:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kiosk77](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@kiosk77](https://forum.kirupa.com/u/kiosk77)
#### Post date: [July 19, 2007, 1:08pm UTC](https://forum.kirupa.com/t/this-extends-scope/233011/1 "2007-07-19T13:08:09Z")

</div>

I’m a bit at a lost with the scope of this when extending a class.

I have a method in Base

```auto

public function isDefinedProperty( prop:String ):Boolean {
            try {
                return this["_"+prop]!=null && this["_"+prop]!="null";
            } catch ( err:Error ) {
                // nothing - handle after the catch
            }
            return false;
        }

```

Now I extend it in my class extended

```auto

private var _property:String = "isGood";

public function test():void {
    trace(isDefinedProperty("property"));
}

```

This traces false because flash says that \_property can not be found, if I define the variable in Base, then it traces true. Is “this” scoped to the based class an ignores inheritance? how can I overcome this?

Thank you.

Senocular, want to go 2 for 2? 🙂
