[REQUEST] Return id of current view?
#1
Container.Viewmode returns a string label. I would like to request one that returns the id of the view as a numeric label.
Reply
#2
How are you planning on using the result?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
I'am trying to detect what the current view mode is inside a dialog which has the focus. Control.IsVisible doesn't work, there are other ways to achieve this but it's not so pretty. The simplest solution is to know what the id is and do a string compare
Reply
#4
I think you can do the same thing now using a string compare with the localized viewmode string? Probably just as (in)elegant Smile

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
Yep, but some of my views have the same name depending on the container content. Also when using another language string compare doesn't work. Using id's, each view would be unique.
Reply
#6
Is it possible to use a number as name of the viewtype?

Code:
<viewtype label="[b]51[/b]">list</viewtype>
Reply

Logout Mark Read Team Forum Stats Members Help
[REQUEST] Return id of current view?0