The-M-Project icon indicating copy to clipboard operation
The-M-Project copied to clipboard

showBackButton does not work if childviews are used and childviews do not work if value and showBackButton are used

Open stephentcannon opened this issue 13 years ago • 1 comments

If you use a childview with a toolbar the showBackButton does not work.

I tested it with both just a label and with a button in the childview and added and removed the childview repeatedly.

  1. childview does not render with showValue and value

header: M.ToolbarView.design({ anchorLocation: M.TOP, showBackButton: YES, value: 'Groups', childViews: 'logoutButton',

logoutButton: EtherPOS.LogoutButton,
 }),
  1. showBackButton does not work if childviews are used

header: M.ToolbarView.design({ anchorLocation: M.TOP, showBackButton: YES, childViews: 'centerLabel logoutButton',

    logoutButton: EtherPOS.LogoutButton,

    centerLabel: M.LabelView.design({
        value: M.I18N.l('groupsPage_title'),
        anchorLocation: M.CENTER
    })

}),

stephentcannon avatar Jul 16 '12 21:07 stephentcannon

I had exactly the same problem, but then recognized a post of dominiklaubach: "Well, this "automatic back button" feature is kind of a relict from the early stages of The-M-Project. When we develop a mobile app today, we add a custom navigation behavior that typically includes a back button.

Even though each app will have its own custom navigation behavior, there are a few things in common for most apps. But so far we weren't able to figure out a generic concept we can provide with The-M-Project."

So I think he meant, if you start to customize your header with own childviews you also should customize your back button and navigation.

StritziK avatar Dec 05 '13 10:12 StritziK