I was able to solve it. I had to make an object. Place the variables there. And then when the KeyWidget is added to the list view, I need to cast so I can get the variables. Although I think that what I was doing should have worked to. And it seems to be a bug.