sms_send("' :Recipient '", string)' newline
22 subreport '_next element' run
23 endreport
180 MOBILE PHONE APPLICATIONS USING A PYTHON FRAMEWORK
creates a stand-alone application installer for sharing the applications, by calling the
build tool for application packaging.
8.5.2 Generator in Action
Application designs were executed in an emulator and in a real target device by
running the generator. This was part of testing the DSM solution. In addition to
executing the generated applications, model checking reports were also tested to
show missing or incomplete parts in the design. Listings 8.4 and 8.5 illustrate code
generated from the model shown in Fig. 8.6. As speci?¬?ed by the generator, code is
structured into functions, one for each dialog and service. In the listings, underlining
is used to mark those parts of the code that are taken from models. To make code
more readable, the listing does not show protected regions. After all, they were not
needed in this sample application.
Listing 8.4 Python code generated from Fig. 8.6.
01 import appuifw
02 import messaging
03
04 # This application provides conference registration by SMS.
05 #Globals
06 Setdata=""
07 Payment=""
08 PersonNamed=""
09
10 exit_flag = False
11 call_stack = []
12 lock = e32.Ao_lock()
...
41 def List3_5396():
42 # List Check Credit card Invoice
43 global Payment
44 choices3_5396 = [u"Check", u"Credit card", u"Invoice"]
45 index = appuifw.
Pages:
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338