lua-users home
lua-l archive

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


On Tue, Mar 8, 2011 at 11:57 AM, Bertrand Mansion <lua@mamasam.net> wrote:


On Tue, Mar 8, 2011 at 9:09 AM, Eric Wing <ewmailing@gmail.com> wrote:
I am happy to announce the second public release of LuaCocoa (v. 0.2).
This version is faster, smaller, and better.

To learn more about LuaCocoa and grab the binaries, please visit:
http://playcontrol.net/opensource/LuaCocoa/


Hi Eric,

I've just tested the Itunes Bridge, it's indeed incomparably faster to start than the previous version.

I tried :

  local playlist = itunes_application:currentPlaylist()
  local plname = playlist:name()
  print(string.format("Current playlist %s", plname)) 

/Library/Frameworks/LuaCocoa.framework/Versions/Current/Tools/luacocoa: ./ScriptingBridge_iTunes.lua:30: bad argument #2 to 'format' (string expected, got userdata)
stack traceback:
[C]: in function 'format'
./ScriptingBridge_iTunes.lua:30: in main chunk
[C]: ?

But this works :

  local playlist = itunes_application:currentPlaylist()
  local plname = playlist:name()
  print(Current playlist " .. plname)

I guess it's related to the metatable in the userdata that does the conversion.
Do you think this could work with string.format ?


--
Bertrand Mansion
Mamasam