The third row contains the menus used in the
views. In S60, the menus are speci?¬?ed as if they were in a menu bar containing toplevel
items like System, App, View, and Context. Current S60 phones, however, only
display one simple menu, formed by concatenating the menus for these top-level
items. A menu item may point to a custom command (not yet implemented in this
FIGURE 8.9 S60 application, views, and menus
186 MOBILE PHONE APPLICATIONS USING A PYTHON FRAMEWORK
DSM solution), a system command like Copy or Quit, or a submenu. Two example
submenus are shown in the fourth row.
8.8.2 C++ Generators
Even a simple S60 application like Fig. 8.9 requires the developer to create a large
number of ?¬?les??”27 in this case. The architecture of these ?¬?les seems to tend toward
high coupling and low cohesion, effectively preventing reuse of any of the ?¬?les in a
subsequent application. The sheer number of ?¬?les makes building a generator
somewhat laborious, but only in the same way as building a single application by hand
would be. The verbosity and repetition between the ?¬?les do, however, mean that a
small amount of modeling effort will result in a prodigious amount of output in terms
of code.
The structure of the C++ generators is shown in Fig. 8.10. The generator begins
on the left by creating the ?¬?ve directories into which the ?¬?les must be created, and
an Autobuild batch ?¬?le that will kick-start the S60 build process and emulator.
Pages:
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348