Jump to content

'int' object has no attribute '__getitem__'


Recommended Posts

Quote

1230 14:42:21291 :: Traceback (most recent call last):

1230 14:42:21291 ::   File "game.py", line 1473, in OnKeyDown

1230 14:42:21291 ::   File "game.py", line 406, in <lambda>

1230 14:42:21291 ::   File "interfaceModule.py", line 2166, in OpenTrackWindow

1230 14:42:21291 ::   File "interfaceModule.py", line 2164, in MakeTrackWindow

1230 14:42:21291 ::   File "uiTrack.py", line 187, in __init__

1230 14:42:21291 ::   File "uiTrack.py", line 360, in __LoadWindow

1230 14:42:21291 ::   File "uiTrack.py", line 385, in SetTrackType

1230 14:42:21292 ::   File "uiTrack.py", line 398, in Refresh

1230 14:42:21292 ::   File "ui.py", line 2669, in RefreshAll

1230 14:42:21292 :: TypeError
1230 14:42:21292 :: : 
1230 14:42:21292 :: 'int' object has no attribute '__getitem__'
1230 14:42:21292 :: 

Quote

    def RefreshAll(self):
        windowHeight = self.GetHeight()
        scrollBar = self.scrollBar
        screenSize = 0
        for child in self.itemList:
            child.exPos = child.GetGlobalPosition()[0]
            if child.exPos[1] > screenSize:
                screenSize = child.exPos[1]
        if screenSize > windowHeight:
            scrollLen = screenSize-windowHeight
            if scrollLen != 0:
                scrollLen += self.scrollLenExtra
            self.scrollLen = scrollLen
            scrollBar.SetMiddleBarSize(float(windowHeight-5)/float(screenSize))
        else:
            scrollBar.SetMiddleBarSize(1.0)
 

 

at this line 

Quote

            if child.exPos[1] > screenSize:
                screenSize = child.exPos[1]

 

anyone have fix please

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.