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

call static function within self class errror. #7

Open
sonygod opened this issue Jan 8, 2021 · 1 comment
Open

call static function within self class errror. #7

sonygod opened this issue Jan 8, 2021 · 1 comment

Comments

@sonygod
Copy link

sonygod commented Jan 8, 2021

add a static function in WatchedClass.hx after build hxml

@interpret  public static function hello():Void{
                trace("static function11");
    }

when call

WatchedClass.hello();//error.

 @interpret  public static function hello():Void{
                trace("static function11");
    }

    /** This is an interpretable method. It is compiled as native haxe code with the app,
        but if the method is updated while the app is running, its new content will be live-reloaded
        and the code will be executed with `interpret`. */
    @interpret public function printSomething() {

        // Just testing calling a native (non-interpreted) method
        // and get its return value
        var className = getClassNameFromNative();

        // Then printing something (note that string interpolation works :))
        trace('$className');
        hello();//work.
         WatchedClass.hello();//error.
       trace(NativeClass.randomName());//error
       

    } //printSomething
@jeremyfa
Copy link
Owner

jeremyfa commented Jan 9, 2021

Hi, thanks for the issue report!

Unfortunately my current focus is on other projects at the moment so I won’t fix that anytime soon, but I will review Pull Request if anybody want to fix that himself

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

2 participants