PrjName = 'swHelloPlus' UID = '0x02222223' resource.menu = [['Hello World Plus!!', infonote_RES( "r_new_string_resource" ) ], ['Request Screen Update', 'iAppView->DrawNow();' ], ['Force Screen Update', 'iAppView->UserDraw();' ], ['Hello', infonote( "Hello World +" ) ], ['Exit', 'Exit();' ], ] resource.strings += [[ 'r_new_string_resource', 'This is Hello World Plus!' ]] # give the application a long and short name (rather than the project name which is the default) resource.caption = ['swHelloWorld+', 'swHW+'] appview.add_public( Method( 'void', 'UserDraw', [], """\ ActivateGc(); Draw( Rect() ); DeactivateGc();""", is_const = True ) ) # key events are defined in TKeyCode (e32keys.h) appview.keyevents( [[ "'2'", infonote( 'Key 2 pressed' ) ], [ "EKeyDownArrow", infonote( 'Down arrow pressed' ) ], ] ) appview.inc_src += [ '' ] # for infonotes appview.members['Draw'].code += """\ // Query what the current time is TTime currentTime; currentTime.HomeTime(); // Format the time into a descriptor, and handle any errors TBuf<32> timeAsText; _LIT (KTimeFormat, "%H : %T : %S"); _LIT (KTimeError, "Error formatting the time!"); TRAPD (err, currentTime.FormatL(timeAsText, KTimeFormat);); if (err != KErrNone) { timeAsText = KTimeError; } // Write the time to the display gc.UseFont(iCoeEnv->NormalFont()); gc.DrawText(timeAsText, TPoint(30,30));\n"""