def onObjectClick(self, event): """function to get movie details on the movie when clicked.""" tempMovie = Movie(2, 4, "132") tempMovie = tempMovie.getMovieByOvalId(event.widget.find_closest(event.x, event.y)[0], self.moviesList) # get id's of the artists starring in this movie artistmovierelation = ArtistMovieRelation(0,0) artistStarring = artistmovierelation.getArtistsByMovieId(tempMovie.getMovieId(), self.relationsList) tempActor = Actor("","") tempActress = Actress("","") # fetches the name of the actor or actress. finds out whether it originated from tbe actor or actress class. artistsStartingNames = [] for artistId in artistStarring: actor = tempActor.getArtistByid(artistId, self.actorsList) if actor != None: artistsStartingNames.append(actor.getArtistName()) else: actress = tempActress.getArtistByid(artistId, self.actressesList) if actress != None: artistsStartingNames.append(actress.getArtistName()) # labels to show the film details self.movieDetailsVar.set('Title of the Film : ' + tempMovie.getMovieTitle() + "\n" + "\n" "Year Film Released : " + tempMovie.getMovieYear() + "\n"+ "\n" "Actor/Actress Name : " + ", ".join(artistsStartingNames))