# Inspectable getter/setter object

**URL:** https://forum.kirupa.com/t/inspectable-getter-setter-object/293185
**Category:** flash
**Created:** [July 24, 2009, 11:51am UTC](https://forum.kirupa.com/t/inspectable-getter-setter-object/293185 "2009-07-24T11:51:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![halian](https://avatars.discourse-cdn.com/v4/letter/h/45deac/32.png) [@halian](https://forum.kirupa.com/u/halian)
#### Post date: [July 24, 2009, 11:51am UTC](https://forum.kirupa.com/t/inspectable-getter-setter-object/293185/1 "2009-07-24T11:51:04Z")

</div>

Hey all. This is killing my brain atm.

I’m trying to have an inspectable object in a class. For some reason…I can’t figure out how to make this work. Below is what I have so far:

```auto

[Inspectable(type=Object, defaultValue="a:5,b:6")]
    public function set myObject(obj:Object){
        __myObject = obj;
        trace(o.a)
        trace(__myObject)
        trace(__myObject.a)
        
    }
    public function get __myObject():Object{
        return __myObject;
    }

```

the resulting trace is as follows:  
undefined  
[object Object]  
undefined

shouldn’t the first and second trace traceout the number 5?

The odd thing is that if i change the whole thing to a number, and use a number as the defaultValue, it will trace out fine. But as soon as I try for an object it gets muddled up.

Any help would be greatly appreciated.
