#921 Could not resolve variable

1.4.6
open
nobody
None
5
2009-05-21
2009-05-21
James Garrison
No

Eclipse 3.5 (Galileo) M7
Pydev+Extensions 1.4.6.2790

Variable display seems to have difficulty with lists inside objects.

See the png attachment -- the header for member "itemList" shows two objects in the list, but clicking the [+] displays "Could not resolve variable

Source:

class A:
def __init__(self,data):
self.data = data

class B:
def __init__(self):
self.item = None
self.itemList = []
self.itemMap = {}
def addItem(self,item):
self.item = item
def addListItem(self,item):
self.itemList.append(item)
def addMapItem(self,key,item):
self.itemMap[key] = item

if __name__ == "__main__":
c = B()
c.addItem(A("test0"))
c.addListItem(A("test1"))
c.addListItem(A("test2"))
c.addMapItem ("test3",A("test3"))
c.addMapItem ("test4",A("test4"))
print("done")

Discussion

  • James Garrison
    James Garrison
    2009-05-21

    Screenshot

     
    Attachments
  • James Garrison
    James Garrison
    2009-05-21

    Source code

     
    Attachments
  • James Garrison
    James Garrison
    2009-05-21

    Uploaded source code as an attachment since the tracker seems to mess up indentation