go from detail screen to category feed

what is the command to go all the way back to the category page?

i want to have a button on my detailScreen take them back all the way out to th ecategory feed

thanks i have tried

if msg.isButtonPressed() then
                 showHomeScreen(screen)
            end if

and this

if msg.isButtonPressed() then
                 showHomeScreen()
            end if

and neither are working, in fact will just sit there when pushing the button

The natural navigation of the screens follows a stack order. this occurs naturally if you write a new brightscript function that includes a event loop for each screen. When you exit the event loop for the screen, you exit the function for the screen and end up in the next function up on the stack which is the event loop for the previous screen and the display stack shows that screen.

It is not advised to allow any other type of navigation, though there are cases where it comes up. If it is something you think is worth the extra coding difficulty, you could keep track of all the references to your screen objects and explicitly close the screen and delete references in a flow that does not follow the stack order.

–Kevin