lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, Oct 5, 2009 at 5:00 PM, David Given <dg@cowlark.com> wrote:
> Yes, really!
>
> http://www.cowlark.com/objective-lua
>
> @interface Point : Object
> @end
>
> @implementation MyClass
>  - init
>    [super init]
>    self.x = 0
>    self.y = 0
>    return self
>  end
>
>  - initX: x Y: y
>    self.x = x
>    self.y = y
>    return self
>  end
>
>  - x
>    return self.x
>  end
>
>  - y
>    return self.y
>  end
>
>  - moveToX: x Y: y
>    self.x = x
>    self.y = y
>  end
>
>  - moveByX: x Y: y
>    self.x = self.x + x
>    self.y = self.y + y
>  end
> @end
>
> local point = [[Point alloc] init]
> [point moveToX: 4 Y: 9]

You should post this on the Cocoa-dev mailing list. I think it is
about time for Apple to include Lua in OSX, just like they do with
Ruby, Python and PHP :)

-- 
Bertrand Mansion
Mamasam