[Tutor] Problems with GUI calling a class
Alan Gauld
alan.gauld at freenet.co.uk
Sat Oct 16 19:35:57 CEST 2004
> line 194, in cricket_getinfo
> self.results_txt.insert(0.0,results)
> UnboundLocalError: local variable 'results' referenced
> before assignment
THis says results doesn't exist yet.
> if self.yes_no == 'N':
> win = 10
> originalscore = 0
> wold = 0
> yold = 0
> results =
WE create results inside the if block.
Is there any chance that yes_no could be other than 'N'
before it gets to this stage?
> Can anyone see why I am not calling the class's
> function properly ?
Thats not what the error message is telling you, it says the
results variable doesn't exist.
Alan G.
More information about the Tutor
mailing list