After extensive searching on the net, I still could not find the answer to my problem. It may be very trivial to you guys, but help would be much appreciated!
I have the following code that works for 3 files/3 functions, but not with 4 files/4 functions. Why?
Code:import appuifw import e32 import appuifw import audio S1 = audio.Sound.open("E:\\Python\\chimes.wav") S2 = audio.Sound.open("E:\\Python\\DingLing.wav") S3 = audio.Sound.open("E:\\Python\\Bleep.wav") S4 = audio.Sound.open("E:\\Python\\Ding.wav") def playS1(): global S1 S1.play(1,0) def playS2(): global S2 S2.play(1,0) def playS3(): global S3 S3.play(1,0) def playS4(): global S4 S4.play(1,0) def quit(): app_lock.signal() app_lock = e32.Ao_lock() # Create a simple menu appuifw.app.menu = [(u"S1", playS1), (u"S2", playS2), (u"S3", playS3), (u"S4", playS4)] appuifw.app.exit_key_handler=quit app_lock.wait()

Reply With Quote

