SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 329 | Next

Steven Kelly and Juha-Pekka Tolvanen

"Domain-Specific Modeling"

5 Python code generated from Fig. 8.6.
Lines 129??“130 save the old title and change the application name. In line 141, the
old title is returned when exiting the application. The new application name is taken
by the generator from the name of the design model. If alternative model naming
should later become necessary, the metamodel could be changed to include a speci?¬?c
property for the application title.
The framework code takes care of the navigation stack. Line 11 in Listing 8.4
de?¬?nes Call_stack as a list. To ensure that there is at least one item in the list (if the user
presses cancel immediately after starting the application) a Stop object is added to the
stack in line 131. The ?¬?rst state (Note3_2543 in the listing) is given and the application
111 def SendSMS3_677():
112 # Sending SMS Registration
113 # Use of global variables
114 global PersonNamed
115 global Payment
116 string = u"Registration "\
117 +unicode(str(PersonNamed))+", "\
118 +unicode(str(Payment))
119 messaging.sms_send("+358400648606", string)
120 return (Note3_2227, False)
121
122 def Stop3_983():
123 # Application stops here
124 global exit_flag
125 exit_flag = True
126 return (lambda: None, False)
127
128 def main():
129 old_title = appuifw.app.title
130 appuifw.app.title = (u"Conference registration")
131 call_stack.


Pages:
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6