LuaCocoa Changelog

New in version 0.3.3

December 13th, 2012
  • (CoreGraphics fix for CFTypes moving through the bridge, new sample project showing subclassing/delegate pattern in Lua with NSOpenPanel and NSSavePanel)
  • Dealt with bug where CFTypes from CoreGraphics crossing through the bridge were being corrupted.
  • Added new example demonstrating the classic delegate pattern featuring NSOpenPanel and NSSavePanel. This example will be complimented by a new example showing the blocks (closure) pattern in the next release utilizing the new Obj-C blocks APIs for NSOpenPanel and NSSavePanel.
  • Additional minor fixes.
  • This will be the last release of the 0.3 branch. 0.4 will introduce Obj-C blocks support which may impact backwards compatibility, particularly on 10.5.

New in version 0.3.2 (December 13th, 2012)

  • - Fixed bug for prepping ffi data return values for structs which was manifesting itself as a ffi failure on Lion 64-bit calling cascadeTopLeftFromPoint in the MinimalAppKit example .
  • All the command line tools (lua, luac, luacocoa) have been changed to compile with garbage collection mode as 'unsupported'. This is to avoid potential problems with 3rd party .so Lua modules that weren't compiled with garbage collection in mind. (This is the likely case.) If there is demand for a gc-enabled-variant, we could consider including a luacocoa_gc tool to the package.
  • Worked around a Lion bug where [LuaCocoa collectExhaustivelyWaitUntilDone:true] causes SimpleLuaView and SimpleLuaOpenGLView cause the application to hang on quit. objc_collect(OBJC_EXHAUSTIVE_COLLECTION | OBJC_WAIT_UNTIL_DONE) never returns and the program is blocks. My suspicion is that it is connected to subclassing in Lua because the SimpleLuaView examples both hang but the CoreAnimationScriptability example does not hang. The two SimpleLuaView applications have been altered to use 'false' to avoid the problem. Filed rdar://10660280
  • Now compiling release binaries under 10.7 against the 10.7 SDK with the Deployment Target still set to 10.5. There seemed to be weird runtime problems when compiled under Xcode 3/10.5/10.6 and running on 10.7. But this means PowerPC is now dropped from the binary release.
  • Note: The Xcode 3 project has not been updated with any of these changes.
  • The command line tools lua and luacocoa are now compiled with LUA_USE_READLINE defined allowing things like up-arrow history searching/repeating:
  • Notes on readline support:
  • Linking against libreadline is problematic for backwards compatibility because Apple always writes the resolved symbolic link in the executable. To work around this, I added a shell script phase that rewrites the resolved symbolic link (libedit.3.dylib) to the symbolic link. This rewrite will fail if the resolved link name is not exactly libedit.3.dylib (say you compile against the 10.6 or 10.8 SDK and not 10.7). And this will not work if libedit breaks compatibility between versions. (rdar://10157076)
  • Xcode 4 seems to have a bug where typing in the Xcode debugger console while running under the debugger will echo all the input you enter. This does not necessarily impact functionality as the echo characters don't seem to be actually submitted to the process. (rdar://10660201)

New in version 0.3.1 (December 13th, 2012)

  • Fixed selector related bug due to Lion/non-Full bridgesupport switchover.

New in version 0.3 (December 13th, 2012)

  • Remove use of helper categories in LuaCocoa implementation to avoid headaches with static linking.
  • Bug fix for returning const char* (strings) through the bridge, e.g. nstring:UTF8String().
  • Added new preprocessor define LUACOCOA_DONT_USE_BUNDLED_LUA_HEADERS so #include "lua.h" can be used instead of in case people need to use a custom version of Lua which is not located in a LuaCocoa subdirectory (for people building LuaCocoa themselves).
  • Optional Source Code: Added simple lua_isinteger implementation to stand in for projects that need LuaCocoa but use a stock version of Lua without LNUM. It is located the the directory: 'etc'
  • Updated bundled LPeg to 0.10.
  • Doxygen (in repo): Experimenting with man page generation in addition to html and Xcode DocSets
  • Changed LuaCocoa to use the non-'Full' .bridgesupport files instead of the 'Full' bridgesupport files because Lion removed the 'Full' versions without warning:
  • As fallout from this change, LuaCocoa no longer requires Obj-C classes to be fully specified in BridgeSupport data to refer to them in Lua code (i.e. Using NSClassFromString to refer to a is no longer necessary to refer to an unspecified class.)
  • Added new Xcode 4 project to deal with Xcode 4 compatibility, plus minor Xcode script phase compatibility fixes:
  • This might be the last PowerPC release because building PowerPC is hard in Xcode 4 and Lion
  • Added APIS: LuaCocoa_PrependToLuaSearchPath, LuaCocoa_PrependToCSearchPath, LuaCocoa_AppendToCSearchPath. These APIs help you add more search paths for Lua plugins and Lua files:
  • The LuaCocoa class will add the .app bundle's PlugIns path to the begining of the search path.
  • The luacocoa shell tool has been modified to look in */Library/Application Support/LuaCocoa/PlugIns for additional .so modules, and */Library/Application Support/LuaCocoa/Scripts for additional .lua scripts.

New in version 0.2 (December 13th, 2012)

  • Big performance improvements over 0.1:
  • Optimized initialization/load times. Names are now resolved through a metatable (which calls LuaCocoa.resolveName) so launch times are now very fast.
  • Cached parsed XML data so repeated method calls don't have to reparse XML data.
  • The LuaCocoa core framework is now over 30% smaller:
  • Removed ParseKit dependency
  • Added LuaCocoa.toCocoa and LuaCocoa.toLua functions to convert between Cocoa and Lua types within Lua scripts.
  • Started formalizing support for instance variables in Lua subclassing. (Put your variables in a special table named __ivars.) (Thanks to Jonathan Mitchell for feedback, testing, and patches for this.)
  • Bug fixes, logging clean ups
  • Initial Doxygen for Obj-C & C APIs. Xcode DocSet Documentation provided too.