[REQUEST] Return id of current view?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
scarfa Offline
Skilled Skinner
Posts: 413
Joined: Jul 2008
Reputation: 25
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 Offline
Team-XBMC Developer
Posts: 24,520
Joined: Oct 2003
Reputation: 138
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.


[Image: badge.gif]
find quote
scarfa Offline
Skilled Skinner
Posts: 413
Joined: Jul 2008
Reputation: 25
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 Offline
Team-XBMC Developer
Posts: 24,520
Joined: Oct 2003
Reputation: 138
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 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: badge.gif]
find quote
scarfa Offline
Skilled Skinner
Posts: 413
Joined: Jul 2008
Reputation: 25
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 Offline
Alaska Group
Posts: 280
Joined: Jun 2009
Location: Germany
Post: #6
Is it possible to use a number as name of the viewtype?

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