[REQUEST] Return id of current view?
scarfa
Skilled Skinner Joined: Jul 2008 Reputation: 25 |
2009-11-15 03:52
Post: #1
Container.Viewmode returns a string label. I would like to request one that returns the id of the view as a numeric label.
|
| find quote |
jmarshall
Team-XBMC Developer Posts: 24,564 Joined: Oct 2003 Reputation: 138 |
2009-11-15 04:05
Post: #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. ![]() |
| find quote |
scarfa
Skilled Skinner Joined: Jul 2008 Reputation: 25 |
2009-11-15 04:38
Post: #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
|
| find quote |
jmarshall
Team-XBMC Developer Posts: 24,564 Joined: Oct 2003 Reputation: 138 |
2009-11-15 04:42
Post: #4
I think you can do the same thing now using a string compare with the localized viewmode string? Probably just as (in)elegant
![]() 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. ![]() |
| find quote |
scarfa
Skilled Skinner Joined: Jul 2008 Reputation: 25 |
2009-11-15 04:48
Post: #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.
(This post was last modified: 2009-11-15 04:51 by scarfa.)
|
| find quote |
eumel
Alaska Group Joined: Jun 2009 Location: Germany |
2010-01-28 13:05
Post: #6
Is it possible to use a number as name of the viewtype?
Code: <viewtype label="[b]51[/b]">list</viewtype> |
| find quote |

![[Image: badge.gif]](http://www.ohloh.net/projects/9132/badge.gif)

![[Image: tbb_sig_2010.png]](http://www.teamblackbolt.co.uk/data/media/tbb_sig_2010.png)
Search
Help