Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug hover doesn't work on (get, set) properties #22

Open
RogerPaladin opened this issue Aug 10, 2019 · 1 comment
Open

debug hover doesn't work on (get, set) properties #22

RogerPaladin opened this issue Aug 10, 2019 · 1 comment

Comments

@RogerPaladin
Copy link

RogerPaladin commented Aug 10, 2019

testClass.x could not be evaluated

263c8559

package;

import flash.display.Sprite;

class Main extends Sprite
{
    public function new() 
    {
        super();
        
        var testClass: TestClass = new TestClass();
        testClass.x = 20;

        trace(testClass.x);
    }
}
package;

class TestClass
{
    private var _x: Int = 0;

    public var x(get, set):Int;

    public function new()
    {

    }

    private function get_x() {
        return this._x;
    }

    private function set_x(value) {
        return this._x = value;
    }
}
@RogerPaladin
Copy link
Author

RogerPaladin commented Aug 31, 2019

Found some solution - add @:flash.property metadata to field

package;

class TestClass
{
    private var _x: Int = 0;

    @:flash.property
    public var x(get, set):Int;

    public function new()
    {

    }

    private function get_x() {
        return this._x;
    }

    private function set_x(value) {
        return this._x = value;
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant