selection_list(choices3_5396)
46 if index <> None:
47 Payment = choices3_5396[index]
48 if index == None:
49 return (Choice_list, True)
50 else:
51 return (SendSMS3_677, True)
52
53 def Note3_2543():
54 appuifw.note(u"Conference registration: Welcome", 'info')
55 return (Choice_list, False)
...
65 def Open3_1803():
GENERATOR FOR PYTHON 181
The generator ?¬?rst produces module import commands (lines 1??“2) based on
the services used, like the messaging module that provides SMS sending services.
This is followed by documentation speci?¬?ed in the design. Next, each service
and dialog is de?¬?ned as a function. Lines 41??“51 describe the code for the payment
method selection that uses a List dialog. After de?¬?ning the function name and
comment, a variable named Payment is declared global to be available for the
other functions in the application. Line 44 shows the list values as Unicode in
a local variable, and line 45 calls the List dialog provided by the Python for S60
API.
Lines 53??“55 create the function code for the welcome note. Lines 65??“69 show the
code for browsing the web. Lines 71??“82 show the pop-up menu code produced by the
generator de?¬?ned in Listing 8.1.
Listing 8.5 shows a text message function, application exit, and common
framework code for handling navigation stack and application start.
Pages:
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339