Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

@App instance = null, from @EBean #228

@fc1943s

Description

@fc1943s

I will try to explain with comments.

Generated Code with @app BaseApp baseApp;:

private void init_() {
    //context_ is not an activity. context.getApplicationContext() is called on getInstance. 
    if (context_ instanceof Activity) {
        Activity activity = ((Activity) context_);
        baseApp = ((BaseApp) activity.getApplication());
    }
    init();
}

Generated Code with @rootcontext BaseApp baseApp;:

private void init_() {
    if (context_ instanceof Activity) {
        Activity activity = ((Activity) context_);
    }
    //here works.
    if (context_ instanceof BaseApp) {
        baseApp = ((BaseApp) context_);
    }
    init();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions