Bug 6942 - don't break encapsulation when manipulating current playlist menu
: don't break encapsulation when manipulating current playlist menu
Status: CLOSED FIXED
Product: SB Controller
Classification: Unclassified
Component: Browser
: unspecified
: Macintosh Other
: P1 normal (vote)
: 7.0.1
Assigned To: Ben Klaas
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-04 14:25 UTC by Ben Klaas
Modified: 2008-05-15 12:27 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Klaas 2008-02-04 14:25:06 UTC
this block of code in SlimBrowser.showPlaylist needs to be fixed so it doesn't inspect the menu table directly. Instead, menu methods like menu:setSelectedIndex() should be used.


      if playlistSize == nil or (playlistSize and playlistSize <= 1) then
                        _statusStep.menu["_lastSelectedIndex"] = 1
                        _statusStep.menu["_lastSelectedOffset"] = 1
                        _statusStep.menu.selected = 1
                        _statusStep.menu:_updateWidgets()
                -- otherwise bring the currently playing item to the screen with offset of 2
                elseif _statusStep.menu.list.currentIndex then
                        _statusStep.menu.selected = _statusStep.menu.list.currentIndex
                        if _statusStep.menu["_lastSelectedIndex"] then
                                _statusStep.menu["_lastSelectedIndex"] = _statusStep.menu.selected
                                _statusStep.menu["_lastSelectedOffset"] = 2
                        end
                        -- since we've hacked the _lastSelectedIndex, it's necessary to 
                        -- _updateWidgets to display correctly selected item
                        _statusStep.menu:_updateWidgets()
                end
Comment 1 Ben Klaas 2008-02-20 13:36:10 UTC
fixed in trunk r1989
Comment 2 James Richardson 2008-05-06 14:51:26 UTC
(In reply to comment #1)
> fixed in trunk r1989
> 

Comment 3 James Richardson 2008-05-15 12:27:34 UTC
This bug has recently been fixed in the latest release of SqueezeCenter 7.0.1

Please try that version, if you still see the error, then reopen this bug.

To download this version, please navigate to: http://www.slimdevices.com/su_downloads.html