Default control for static lists weirdness
#1
Rewriting the home screen for Alaska HD I thought I'd use this feature so I could reduce the number of buttons/lists the previous version used for the submenus - accessed by pressing Up or Down from the main control.

So I've used a single list for each panel (group) and because some of them have items (ie Recently Added) that I want to be available by scrolling up from the default control (ie Movies) I've added
<defaultcontrol [COLOR="red"]always="true">9</defaultcontrol>[/COLOR] - where item 9 is the main control and items 1-8 are the recently added items.

This worked fine during testing until I restarted XBMC and for some reason the visible conditions attached to items 1-8 (ie <visible>!IsEmpty(Window.Property(LatestMovie.1.Title))</visible>) mess the default control up when the home screen first loads resulting in the top most recently added movie gaining focus (id=1) but a refresh or entering and exiting any window fixes it.

I can supply code if needed, thanks.
Reply
#2
maybe because the window.properties() haven't been set yet at startup?
which would result in an empty container, so defaultcontrol fails.

..just thinking out loud
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Hitcher Wrote:Rewriting the home screen for Alaska HD I thought I'd use this feature so I could reduce the number of buttons/lists the previous version used for the submenus - accessed by pressing Up or Down from the main control.

So I've used a single list for each panel (group) and because some of them have items (ie Recently Added) that I want to be available by scrolling up from the default control (ie Movies) I've added
<defaultcontrol [COLOR="red"]always="true">9</defaultcontrol>[/COLOR] - where item 9 is the main control and items 1-8 are the recently added items.

This worked fine during testing until I restarted XBMC and for some reason the visible conditions attached to items 1-8 (ie <visible>!IsEmpty(Window.Property(LatestMovie.1.Title))</visible>) mess the default control up when the home screen first loads resulting in the top most recently added movie gaining focus (id=1) but a refresh or entering and exiting any window fixes it.

I can supply code if needed, thanks.

I did not know this existed so I used <onload> with control.move in similar situation.
My skins:

Amber
Quartz

Reply
#4
ronie Wrote:maybe because the window.properties() haven't been set yet at startup?
which would result in an empty container, so defaultcontrol fails.

..just thinking out loud

I think it's definitely something to do with that but as you can see from this video they initially get the correct focus and then, I assume when the properties are filled, they just revert back to the first item in the list.

http://youtu.be/qbsHvZ-JWRY
Reply
#5
@Hitcher,
mind sharing Your .xmls?
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
Reply
#6
PMed.
Reply
#7
Any thoughts pieh?

Thanks.
Reply
#8
Seems like the updating of items in the list doesn't refocus on the correct item. i.e. initially item number 1 (id 9) has focus as it's the only one visible. After the rest become visible, item number 1 (id 1 maybe?) has focus.

Solution is making sure focused item stays focused (if still available) during static item update.

@pieh: you on it?
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
#9
jmarshall Wrote:Seems like the updating of items in the list doesn't refocus on the correct item. i.e. initially item number 1 (id 9) has focus as it's the only one visible. After the rest become visible, item number 1 (id 1 maybe?) has focus.

Yes, that's exactly what's happening.

I could remove the visible conditions but then if they were empty the user would be cycling through 'N/A' labels which I'd rather like to avoid.

Thanks.
Reply
#10
Yeah, I have fixed it locally (got it on my github in static_selection branch). Just need some quality time with pc instead of phone to close this issue.

---edit
and fixed in ffdb63df
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
Reply
#11
Works a treat. Big Grin

Thanks.
Reply
#12
Is <defaultcontrol> supposed to work for grouplist?
My skins:

Amber
Quartz

Reply
#13
pecinko Wrote:Is <defaultcontrol> supposed to work for grouplist?

No, but it would be more than welcome.

In fact I'd like to request focusposition be added to grouplists to make them even more flexible.
Reply
#14
I haven't updated in a few weeks but using 12-Sep-2012 nightly this is broken.

I'll try and pinpoint it tomorrow.

Thanks.
Reply
#15
Working - XBMCSetup-20120908-3aa82b8-master.exe 08-Sep-2012 10:29

Broken - XBMCSetup-20120909-74be277-master.exe 09-Sep-2012 10:33

Thanks.
Reply

Logout Mark Read Team Forum Stats Members Help
Default control for static lists weirdness0