<s> import pyjd <EOL> from pyjamas import Window <EOL> def log ( text ) : <EOL> Window . alert ( text ) <EOL> def global_printable ( text ) : <EOL> log ( text ) <EOL> class MainTest : <EOL> def onModuleLoad ( self ) : <EOL> s = StoringObject ( ) <EOL> s . save ( self . printable ) <EOL> s . message = "<STR_LIT>" <EOL> s . call ( ) <EOL> s . save ( getattr ( self , '<STR_LIT>' ) ) <EOL> s . message = "<STR_LIT>" <EOL> s . call ( ) <EOL> s . save ( global_printable ) <EOL> s . message = "<STR_LIT>" <EOL> s . call ( ) <EOL> @ staticmethod <EOL> def printable ( text ) : <EOL> log ( text ) <EOL> class StoringObject : <EOL> def save ( self , func ) : <EOL> self . func = func <EOL> def call ( self ) : <EOL> self . func ( self . message ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> pyjd . setup ( "<STR_LIT>" ) <EOL> app = MainTest ( ) <EOL> app . onModuleLoad ( ) <EOL> pyjd . run ( ) </s>
