func init // adds using namespace sys.add_use('ColorMine.ColorSpaces') // adds assembly sys.add_assembly('ColorMine', 'ColorMine.dll') // initialize instance sys.add_object(this.codename, 'Lab') if(not (isdef("L") and isdef("A") and isdef("B"))) blk_init.println(this.codename, ' = new Lab { L = ', this.props("L").value, 'f, A = ', this.props("A").value, 'f, B = ', this.props("B").value, 'f } ;') end // make methods for the fields sys._prop_init('L', 1, 1, 7) sys._prop_init('A', 1, 1, 7) sys._prop_init('B', 1, 1, 7) // makes implementation of methods as properties sys._mtd_as_prop_init('Lab') end func doFromSample(data) dt = d("Sample") blk.println(this.codename, ' = new Lab { L = ', dt, '[0], A = ', dt, '[1], B = ', dt, '[2] } ;') end