Line 11 produces the actual pop-up call using the service from the Python framework.
It gives as parameters the choice elements de?¬?ned for the list and label of the pop-up.
If no label is given, an empty Unicode string is generated. Lines 12??“13 save the
selection made in the pop-up into a global variable (done in a subreport ???_Return
variable name???). If no return variable name is given, then the choice value given by the
application user will not be used other than for choosing the navigation path.
Reusable Generator Modules: Navigation As several concepts require
similar code to be generated, such as navigation ?¬‚owand function naming, parts of the
generator de?¬?nitions are made into modules called by other generator modules. For
example, the generator module ???_Back??? is used by several dialogs to generate
178 MOBILE PHONE APPLICATIONS USING A PYTHON FRAMEWORK
canceling code. The generator module ???_next choiced element??? in line 16 is also used
by List to generate transition code based on the choices made in the list dialog.
Part of this generator module is illustrated in Listing 8.2 below. To allow drawing
models where choices don??™t need to be explicitly speci?¬?ed but can be left unde?¬?ned,
the models are read twice: ?¬?rst, for cases where all list values are speci?¬?ed (like in the
pop-up for choosing an action in Fig.
Pages:
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334