fork/m-overlay
git clone https://git.julia.blue/fork/m-overlay
a7d6bcc
gui
1local class =require ( "class" ) 2 3local FOO ={} 4 5function FOO : Initialize () 6( self , "FOO Initialize" ) 7self . m_sFoo ="foo" 8end 9 10function FOO : FooMethod () 11( "I LIKE FOO" ) 12end 13 14function FOO : Shared () 15( "Shared from foo.." ) 16end 17 18class . register ( "FOO" )( FOO ) 19 20local BAR ={} 21 22function BAR : Initialize () 23( self , "BAR Initialize" ) 24self . m_sBar ="bar" 25self : super () 26end 27 28function BAR : BarMethod () 29( "I LIKE BAR" ) 30end 31 32class . register ( "BAR" , "FOO" )( BAR ) 33 34local FOOBAR ={} 35 36function FOOBAR : Initialize () 37( self , "FOOBAR Initialize" ) 38self . m_sFooBar ="foobar" 39self : super () 40end 41 42function FOOBAR : FooBarMethod () 43( "I LIKE FOOBAR" ) 44end 45 46class . register ( "FOOBAR" , "BAR" )( FOOBAR ) 47 48class . init () 49 50local foo =class . new ( "FOO" ) 51foo : FooMethod () 52foo : Shared () 53( foo . m_sFoo ) 54( foo . m_sBar ) 55( foo . m_sFooBar ) 56 57local bar =class . new ( "BAR" ) 58bar : FooMethod () 59bar : BarMethod () 60bar : Shared () 61( bar . m_sFoo ) 62( bar . m_sBar ) 63( bar . m_sFooBar ) 64 65local foobar =class . new ( "FOOBAR" ) 66foobar : FooMethod () 67foobar : BarMethod () 68foobar : FooBarMethod () 69foobar : Shared () 70( foobar . m_sFoo ) 71( foobar . m_sBar ) 72( foobar . m_sFooBar ) 73 74return class