Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

ClassCastException in sample #170

@MichaelEvans

Description

@MichaelEvans

I'm new to mortar, so perhaps this is an easy fix (in which case I'd be glad to send a PR)

Navigating to the a Friend screen and hitting back/up/"friend" in the Actionbar yields a ClassCastException with the stack trace attached. I'm guessing that the answer lies in the fact that FramePathContainerView expects all it's children to be ViewGroups, rather than just views?

 java.lang.ClassCastException: com.example.mortar.view.FriendView cannot be cast to android.view.ViewGroup
            at com.example.mortar.screen.FramePathContainerView.getCurrentChild(FramePathContainerView.java:78)
            at flow.path.PathContainer.executeTraversal(PathContainer.java:71)
            at com.example.mortar.screen.FramePathContainerView.dispatch(FramePathContainerView.java:65)
            at com.example.mortar.core.MortarDemoActivity.dispatch(MortarDemoActivity.java:78)
            at flow.Flow$PendingTraversal.dispatch(Flow.java:315)
            at flow.Flow$2.doExecute(Flow.java:197)
            at flow.Flow$PendingTraversal.execute(Flow.java:323)
            at flow.Flow.move(Flow.java:232)
            at flow.Flow.set(Flow.java:162)
            at com.example.mortar.core.MortarDemoActivity$1.call(MortarDemoActivity.java:72)
            at com.example.mortar.core.MortarDemoActivity$2.onMenuItemClick(MortarDemoActivity.java:166)
            at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:147)
            at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:874)
            at com.android.internal.view.menu.ActionMenuView.invokeItem(ActionMenuView.java:546)
            at com.android.internal.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:115)
            at android.view.View.performClick(View.java:4438)
            at android.view.View$PerformClick.run(View.java:18422)
            at android.os.Handler.handleCallback(Handler.java:733)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5017)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
            at dalvik.system.NativeStart.main(Native Method)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions